Does your __init__.py import the otehr files, or does it import the
models from them?  If the former, then model Foo in foo.py of
the models package of app bar must be referred to as
bar.models.foo.Foo, whereas in the later case, as with having
everything in a models.py file, bar.models.Foo will work.

One answer to this would be an __all__ not in __init__.py, but
in foo.py, specifying the model, and then using:
  from foo import *
in __init__.py, rather than:
  import foo

There might be other problems, but things will have a better
chance if the interesting stuff is in the bar.models namespace
directly.

On Sat, May 1, 2010 at 1:45 AM, akonsu <ako...@gmail.com> wrote:
> 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-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>

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

Reply via email to