(r'^admin/', include('admin.site.urls')), --> (r'^admin/',
include(admin.site.urls)),
I was trying too hard!
--
E
On Tue, Dec 28, 2010 at 4:32 PM, Emmanuel Mayssat <emayssat@gmail.com> wrote:
> Hello,
>
> I followed http://docs.djangoproject.com/en/dev/intro/tutorial02/
> and attempted to enable the django admin interface, but it does not show.
> Actually it returns an error,
>
>
> Django version 1.1.1, using settings 'komunity.settings'
> Development server is running at http://127.0.0.1:8080/
> Quit the server with CONTROL-C.
> Traceback (most recent call last):
> File "/usr/lib/pymodules/python2.6/django/core/servers/basehttp.py",
> line 279, in run
> self.result = application(self.environ, self.start_response)
> File "/usr/lib/pymodules/python2.6/django/core/servers/basehttp.py",
> line 651, in __call__
> return self.application(environ, start_response)
> File "/usr/lib/pymodules/python2.6/django/core/handlers/wsgi.py",
> line 241, in __call__
> response = self.get_response(request)
> File "/usr/lib/pymodules/python2.6/django/core/handlers/base.py",
> line 73, in get_response
> response = middleware_method(request)
> File "/usr/lib/pymodules/python2.6/django/middleware/common.py",
> line 57, in process_request
> _is_valid_path("%s/" % request.path_info)):
> File "/usr/lib/pymodules/python2.6/django/middleware/common.py",
> line 142, in _is_valid_path
> urlresolvers.resolve(path)
> File "/usr/lib/pymodules/python2.6/django/core/urlresolvers.py",
> line 303, in resolve
> return get_resolver(urlconf).resolve(path)
> File "/usr/lib/pymodules/python2.6/django/core/urlresolvers.py",
> line 218, in resolve
> sub_match = pattern.resolve(new_path)
> File "/usr/lib/pymodules/python2.6/django/core/urlresolvers.py",
> line 216, in resolve
> for pattern in self.url_patterns:
> File "/usr/lib/pymodules/python2.6/django/core/urlresolvers.py",
> line 245, in _get_url_patterns
> patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
> File "/usr/lib/pymodules/python2.6/django/core/urlresolvers.py",
> line 240, in _get_urlconf_module
> self._urlconf_module = import_module(self.urlconf_name)
> File "/usr/lib/pymodules/python2.6/django/utils/importlib.py", line
> 35, in import_module
> __import__(name)
> ImportError: No module named admin.site.urls
>
>
> and yes, I undommented the following lines in settings.py
> # Uncomment the next two lines to enable the admin:
> from django.contrib import admin
> admin.autodiscover()
>
> and added
> urlpatterns = patterns('',
> [....]
> # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
> # to INSTALLED_APPS to enable admin documentation:
> (r'^admin/doc/', include('django.contrib.admindocs.urls')),
>
> # Uncomment the next line to enable the admin:
> (r'^admin/', include('admin.site.urls')),
> #(r'^admin/', include('django.admin.site.urls')),
> #(r'^admin/', include('django.contrib.admin.site')),
> #(r'^admin/', include('django.contrib.admin.urls')),
> #(r'^admin/', include('django.contrib.admin')),
> )
> and yes, the python-django package is installed and has
> /usr/share/pyshared/django/contrib/admin/sites.py
>
> am I missing something?
>
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment