Friday, April 30, 2010

models as a package

hello,

i would like to replace my models.py with a package that has a
hierarchical directory structure. in __init__.py i want to define my
base models, and the other files would contain models that inherit the
base models.

in particular i am trying to define proxy models for my models and put
them in to separate files.

the problem is that the user admin system's "change user" screen does
not list the permissions for proxies if they are located in separate
files. if i put proxy classes in to __init__.py and re-run syncdb,
then the permissions get listed. otherwise not. i tried creating
__all__ array in my __init__.py that includes the proxy files, and i
tried importing the files in to __init__.py to no avail.

how can this be done?

thanks
konstantin

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate