Author: jacob
Date: 2008-07-21 12:10:33 -0500 (Mon, 21 Jul 2008)
New Revision: 8027

Modified:
   django/trunk/docs/tutorial02.txt
Log:
Improved the bit of the tutorial that explains how to enable the admin. Fixes 
#7824.


Modified: django/trunk/docs/tutorial02.txt
===================================================================
--- django/trunk/docs/tutorial02.txt    2008-07-21 17:10:27 UTC (rev 8026)
+++ django/trunk/docs/tutorial02.txt    2008-07-21 17:10:33 UTC (rev 8027)
@@ -29,13 +29,37 @@
 activate the admin site for your installation, do these three things:
 
     * Add ``"django.contrib.admin"`` to your ``INSTALLED_APPS`` setting.
+    
     * Run ``python manage.py syncdb``. Since you have added a new application
       to ``INSTALLED_APPS``, the database tables need to be updated.
+      
     * Edit your ``mysite/urls.py`` 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
+      ``urls.py`` 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/(.*)', admin.site.root),**
+          )
+          
+      (The bold lines are the ones that needed to be uncommented.)
+
 Start the development server
 ============================
 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to