I get to know Django.
I have successfully installed and tested the demo site. Now I want to enable the admin module to find out what will happen.
The steps I took (provided, some of them are not needed, but I just wanted to make sure that I start from scratch):
- Edited mysite / settings.py to enable admin
- Edited mysite / url.py to enable admin
- dropped and restored my backend db
- run it. /manage.py syncdb (and answered prompts correctly)
- started dev web server (./manange.py runningerver)
This is what my mysite / settings.py file looks like (only for the corresponding section)
INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages',
This is what my mysite / urls.py file looks like:
from django.contrib import admin admin.autodiscover() urlpatterns = patterns('',
When I look at the server url, I get this response:
Page not found (404) Request Method: GET Request URL: http://127.0.0.1:8000/ Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order: 1. ^admin/doc/ 2. ^admin/ The current URL, , didn't match any of these. You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.
What am I doing wrong?
python django django-models django-admin django-urls
skyeagle
source share