> Hm, a code running fast is really good but this solution seems to be really
> experimental and hard-to-use, as well as making code kinda unreadable. It
> would be great if it's implemented in next django releases to make django
> fast :). Is it possible to do it?
It depends on Django developers
Ivan Illarionov napisał(a):
> You may add this code to your Django model class and then instead of
> obj = YourModelClass(title='Title', ,
> pub_date=datetime.datetime.now() )
> use
> row = (None, 'Title',..., datetime.datetime.now())
> obj = YourModelClass.fromtuple(row) # 1.3x faster then b
On 30 Jan 2008 Wed 03:08:02 Ivan Illarionov wrote:
> And, be careful, the code is experimental, untested and relies on deep
> black magic of object.__new__(class) which creates the instance
> without calling __init__
Hm, a code running fast is really good but this solution seems to be really
exp
After discussion on Django developers group about
Model.__init__(*args) deprecation I found the way to dramatically
optimize instantiation of Django models. Here is a code:
http://pastebin.com/m8e7e365
You may add this code to your Django model class and then instead of
obj = YourModelClass(titl
4 matches
Mail list logo