Changeset 7872 for django/branches/newforms-admin/docs/admin.txt
- Timestamp:
- 07/09/08 11:01:33 (6 months ago)
- Files:
-
- django/branches/newforms-admin/docs/admin.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/newforms-admin/docs/admin.txt
r7684 r7872 610 610 from django.conf.urls.defaults import * 611 611 from django.contrib import admin 612 613 admin.autodiscover() 612 614 613 615 urlpatterns = patterns('', … … 615 617 ) 616 618 619 Above we used ``admin.autodiscover()`` to automatically load the 620 ``INSTALLED_APPS`` admin.py modules. 621 617 622 In this example, we register the ``AdminSite`` instance 618 623 ``myproject.admin.admin_site`` at the URL ``/myadmin/`` :: … … 625 630 ('^myadmin/(.*)', admin_site.root), 626 631 ) 632 633 There is really no need to use autodiscover when using your own ``AdminSite`` 634 instance since you will likely be importing all the per-app admin.py modules 635 in your ``myproject.admin`` module. 627 636 628 637 Note that the regular expression in the URLpattern *must* group everything in
