Hi,

look into  django/db/models/fields/__init__.py and search for 'creation_counter'


Honza Král
E-Mail: [email protected]
ICQ#:   107471613
Phone:  +420 606 678585



On Sun, Jan 11, 2009 at 10:19 PM, dauerbaustelle <[email protected]> wrote:
>
> Hi there,
>
> I'm writing some python stuff using metaclasses. I use declarative
> syntax like django's db.models.Model and the dict is catched by some
> metaclass __init__ method. My Problem is, that, unfortunately, the
> order of the variables I get is not the same as the order the
> variables I set:
>
> class FooBar(Parent):
>    foo = blah
>    bar = blubb
>    bizz = peng
>    buzz = pumm
>
> will end in something like
> {'bizz' : peng, 'bar' : blubb, 'foo' : blah, 'buzz' : pumm}
>
> As I can see, django's models.Model metaclass manages the vars in the
> right order (as one can see at the admin webinterface) - this is
> confusing me... dict's aren't sorted types, so who do you do this?
>
> Would be nice to know ;-)
>
>  - dauerbaustelle
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to