Wednesday, June 27, 2012

Re: Where admin classes should be registered ?

As your approach, at admin/__init__.py i have to

from myapp.admin.ouradmin import *

That means import all of the classes inside that files.

On Wed, Jun 27, 2012 at 2:54 PM, Matt Schinckel <matt@schinckel.net> wrote:
I generally register admin models where I define them, and then just import that
file in admin/__init__.py

If you are getting multiple registration errors, it may be that your app appears
twice in sys.path (perhaps as app, and project.app?).

That's generally a Bad Thing(tm).

Matt.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/VXzngj1e75sJ.

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.

--
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.

No comments:

Post a Comment