What version of django are you using? admin.site.urls was introducd four years ago ( https://github.com/django/django/commit/1f84630c87f8032b0167e6db41acaf50ab710879), but maybe you're running an older version?
Best, Thomas 2012/12/15 向浩 <ambih...@gmail.com> > Environment: > > Request Method: GET > Request URL: http://127.0.0.1:8000/admin/ > Django Version: 1.0.4 > Python Version: 2.7.3 > Installed Applications: > ['django.contrib.auth', > 'django.contrib.admin', > 'django.contrib.contenttypes', > 'django.contrib.sessions', > 'django.contrib.sites', > 'mysite.books'] > Installed Middleware: > ('django.middleware.common.CommonMiddleware', > 'django.contrib.sessions.middleware.SessionMiddleware', > 'django.contrib.auth.middleware.AuthenticationMiddleware') > > > Traceback: > File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" > in get_response > 82. request.path_info) > File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py" > in resolve > 181. for pattern in self.urlconf_module.urlpatterns: > File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py" > in _get_urlconf_module > 205. self._urlconf_module = __import__(self.urlconf_name, > {}, {}, ['']) > File "/home/xhao/djcode/mysite/../mysite/urls.py" in <module> > 16. (r'^admin/', include(admin.site.urls)), > > Exception Type: AttributeError at /admin/ > Exception Value: 'AdminSite' object has no attribute 'urls' > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/django-users/-/SdlHuLExd9YJ. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.