Django 无法进入admin界面问题

Django 无法进入admin界面问题

win2008下 py2.5.2 dj1.02

url.py

#!/usr/bin/env python   
#coding:utf-8
from django.conf.urls.defaults import *

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    (r'^$', index),
    (r'^admin/', include('django.contrib.admin.urls')),
)

数据库用的 dqlite3,syncdb测试没问题
只要一进admin 就报错,查半天也查不出,请指正问题所在

Environment:

Request Method: GET
Request URL: http://192.168.1.10:8080/admin/
Django Version: 1.0.2 final
Python Version: 2.5.2
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'mysite.books']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware')


Traceback:
File "C:\Python25\Lib\site-packages\django\core\handlers\base.py" in get_response
  77.                     request.path_info)
File "C:\Python25\Lib\site-packages\django\core\urlresolvers.py" in resolve
  181.                     sub_match = pattern.resolve(new_path)
File "C:\Python25\Lib\site-packages\django\core\urlresolvers.py" in resolve
  179.             for pattern in self.urlconf_module.urlpatterns:
File "C:\Python25\Lib\site-packages\django\core\urlresolvers.py" in _get_urlconf_module
  198.             self._urlconf_module = __import__(self.urlconf_name, {}, {}, [''])

Exception Type: ImportError at /admin/
Exception Value: No module named urls
admin.py没有。。。。。。先照着tutorial作一遍
加了admin.py 结果又出现新的错误 貌似1.x的admin与以前的不一样

from mysite.books.models import *
from django.contrib import admin

admin.site.register(Publisher)
admin.site.register(Author)
admin.site.register(Book)

class Publisher(models.Model):
    def __unicode__(self):
        return self.name
-----------------------------------------------

Environment:

Request Method: GET
Request URL: http://localhost:8080/admin/
Django Version: 1.0.2 final
Python Version: 2.5.2
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'mysite.books']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware')


Traceback:
File "C:\Python25\Lib\site-packages\django\core\handlers\base.py" in get_response
  86.                 response = callback(request, *callback_args, **callback_kwargs)
File "C:\Python25\Lib\site-packages\django\contrib\admin\sites.py" in root
  128.             self.check_dependencies()
File "C:\Python25\Lib\site-packages\django\contrib\admin\sites.py" in check_dependencies
  116.             raise ImproperlyConfigured("Put 'django.core.context_processors.auth' in your TEMPLATE_CONTEXT_PROCESSORS setting in order to use the admin application.")

Exception Type: ImproperlyConfigured at /admin/
Exception Value: Put 'django.core.context_processors.auth' in your TEMPLATE_CONTEXT_PROCESSORS setting in order to use the admin application.

http://docs.djangoproject.com/en ... 2/#intro-tutorial02
这里对 admin说的很清楚  照做就可以了