Strange, I'm getting the message "You don't have permission to edit
anything." on the admin homepage. I've done admin.autodiscover() on
the project urls page, I've created admin.py files for my models and
registered the classes with admin.site.register().

Any clues?

Cheers!
Justin


On Jul 19, 10:43 am, Brian Rosner <[EMAIL PROTECTED]> wrote:
> On Jul 19, 2008, at 10:36 AM, Eric Abrahamsen wrote:
>
> > Short answer: register all your models with admin.site.register(), and
> > use admin.autodiscover() too.
>
> This is correct. admin.autodiscover() simply imports admin.py modules  
> in your INSTALLED_APPS. Previously, in the days of the branch, there  
> was a time when there was no convention and people all relied on  
> importing the admin module in their __init__.py which worked well for  
> many, but others had really bad failures.
>
> One thing to keep in mind that really isn't described as well as it  
> could in the docs is that admin.autodiscover() is really there for  
> convenience. Most of the timeyouwill only ever need to register your  
> models with the default AdminSite instance which is located at  
> django.contrib.admin.site. However, ifyouneed tohavemore than one  
> admin site or would like to modify which models are displayed on a  
> single admin thenyouwill likely be creating your own AdminSite class  
> and registering models to that instead of the default. In which case  
> the admin.autodiscover() is not needed and app admin.py module merely  
> become a place for storing ModelAdmin classes and if its a reusable  
> appyouwould also keep around register calls for the default  
> AdminSite instance for the user common case.
>
> Brian Rosnerhttp://oebfare.com
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to