Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improved the bit of the tutorial that explains how to enable the admi…

…n. Fixes #7824.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit ba6d7e1baee2992324b2b24c0b3bd6692e61ae92 1 parent f3ec0c1
@jacobian jacobian authored
Showing with 25 additions and 1 deletion.
  1. +25 −1 docs/tutorial02.txt
26 docs/tutorial02.txt
@@ -29,12 +29,36 @@ The Django admin site is not activated by default -- it's an opt-in thing. To
activate the admin site for your installation, do these three things:
* Add ``"django.contrib.admin"`` to your ``INSTALLED_APPS`` setting.
* Run ``python syncdb``. Since you have added a new application
to ``INSTALLED_APPS``, the database tables need to be updated.
* Edit your ``mysite/`` file and uncomment the lines below the
"Uncomment this for admin:" comments. This file is a URLconf; we'll dig
into URLconfs in the next tutorial. For now, all you need to know is that
- it maps URL roots to applications.
+ it maps URL roots to applications. In the end, you should have a
+ ```` file that looks like this:
+ .. parsed-literal::
+ from django.conf.urls.defaults import *
+ # Uncomment the next two lines to enable the admin:
+ **from django.contrib import admin**
+ **admin.autodiscover()**
+ urlpatterns = patterns('',
+ # Example:
+ # (r'^{{ project_name }}/', include('{{ project_name }}.foo.urls')),
+ # Uncomment the next line to enable admin documentation:
+ # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
+ # Uncomment the next line for to enable the admin:
+ **(r'^admin/(.*)',,**
+ )
+ (The bold lines are the ones that needed to be uncommented.)
Start the development server
Please sign in to comment.
Something went wrong with that request. Please try again.