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:
clas
Hi,
look into django/db/models/fields/__init__.py and search for 'creation_counter'
Honza Král
E-Mail: honza.k...@gmail.com
ICQ#: 107471613
Phone: +420 606 678585
On Sun, Jan 11, 2009 at 10:19 PM, dauerbaustelle wrote:
>
> Hi there,
>
> I'm writing some python stuff using metaclasses. I
I can write a short overview:
Each model field(or form field) is marked by special counter while
model(or form) is loading. Then in metaclass fields are sorted by that
counter.
I've recently written the blog post about this staff but its in
Russian language. Overwise you can look at code snipp
Alex Koshelev wrote:
> I can write a short overview:
>Each model field(or form field) is marked by special counter while
> model(or form) is loading. Then in metaclass fields are sorted by that
> counter.
>
> I've recently written the blog post about this staff but its in
> Russian language.
You are using self.__class__ which is different for foo and bar
(BooleanField), buzz (IntegerField) etc.
use Field.creation_counter instead of self.__class__
Honza Král
E-Mail: honza.k...@gmail.com
ICQ#: 107471613
Phone: +420 606 678585
On Mon, Jan 12, 2009 at 3:15 PM, Jonas Haag wrote:
>
Honza Král wrote:
> use Field.creation_counter instead of self.__class__
Oh, yeah. Thank you, it works :-)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email