Hi guys,

I am using a metaclass to standardize how I link two classes, on Django 
1.6. This is done in order to have a generic way of connecting classes 
without having to know the name of the fields being linked.

Basically, I have in my metaclass '*post_new*' method to get the 'other' 
model, using *model._meta.get_field_by_name('item') *I use this afterward 
like following *add_lazy_relation(model, None, item_model, 
add_passthrough_fields) *

I add these PassThrough fields again getting the fields from the meta, 
overwriting the getter and the setter.

Upgrading to Django 1.7 is impossible with what I'm currently doing. I get 
tons of *AppRegistryNotReady* , since it is going through this post_new 
method at the very beginning. 

Maybe you have a suggestion how I could get around this or which other 
methods to call to call later (but not too late, those are metaclasses) in 
order to get the list of fields. Maybe some code snippets running on Django 
1.7 and using models with metaclasses could already help.

Thanks in advance,
Matthieu

PS: I know it is a bit uncommon to do so and if you don't need to do so and 
use these metaclasses, you shouldn't ;-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/edfa1f75-212e-41a0-b3c2-6ddcb125efc1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to