Changes between Version 58 and Version 59 of NewformsAdminBranch


Ignore:
Timestamp:
Jul 9, 2008, 12:27:11 PM (16 years ago)
Author:
Brian Rosner
Comment:

updated the changes from [7872]

Legend:

Unmodified
Added
Removed
Modified
  • NewformsAdminBranch

    v58 v59  
    4444from django.contrib import admin
    4545
     46admin.autodiscover()
     47
    4648urlpatterns = patterns('',
    4749    (r'^admin/(.*)', admin.site.root),
     
    5052
    5153Note that, in this above URLconf example, we're dealing with the object {{{django.contrib.admin.site}}}. This is an instance of {{{django.contrib.admin.AdminSite}}}, which is a class that lets you specify admin-site functionality. The object {{{django.contrib.admin.site}}} is a default {{{AdminSite}}} instance that is created for you automatically, but you can also create other instances as you see fit.
     54
     55We use the {{{admin.autodiscover()}}} call above to force the import of the {{{admin.py}}} module of each {{{INSTALLED_APPS}}} entry. This won't be needed if you use your own {{{AdminSite}}} instance since you will likely be importing those modules explicily in a project-level {{{admin.py}}}. This was added in [7872].
    5256
    5357Previously, there was one "global" version of the admin site, which used all models that contained a {{{class Admin}}}. This new scheme allows for much more fine-grained control over your admin sites, allowing you to have multiple admin sites in the same Django instance.
     
    353357    filter_horizontal = ('field2',)
    354358}}}
     359
Back to Top