Ticket #11880: 11880.diff

File 11880.diff, 1.2 KB (added by Tim Graham, 15 years ago)
  • docs/ref/contrib/admin/index.txt

     
    13011301    admin.autodiscover()
    13021302
    13031303    urlpatterns = patterns('',
    1304         ('^admin/', include(admin.site.urls)),
     1304        (r'^admin/', include(admin.site.urls)),
    13051305    )
    13061306
    13071307Above we used ``admin.autodiscover()`` to automatically load the
     
    13151315    from myproject.admin import admin_site
    13161316
    13171317    urlpatterns = patterns('',
    1318         ('^myadmin/', include(admin_site.urls)),
     1318        (r'^myadmin/', include(admin_site.urls)),
    13191319    )
    13201320
    13211321There is really no need to use autodiscover when using your own ``AdminSite``
     
    13431343    from myproject.admin import basic_site, advanced_site
    13441344
    13451345    urlpatterns = patterns('',
    1346         ('^basic-admin/', include(basic_site.urls)),
    1347         ('^advanced-admin/', include(advanced_site.urls)),
     1346        (r'^basic-admin/', include(basic_site.urls)),
     1347        (r'^advanced-admin/', include(advanced_site.urls)),
    13481348    )
    13491349
    13501350``AdminSite`` instances take a single argument to their constructor, their
Back to Top