3

I had correctly configured a Django app and had it running smoothly. However, when I went to enable the administration panel, I encountered a 404 error upon uncommenting this line:

url(r'^admin/', include(admin.site.urls))

Upon trying to access my site, I received this:

Using the URLconf defined in cms.urls, Django tried these URL patterns, in this order:

    1. ^admin/

The current URL, , didn't match any of these.

I can't figure out how to get around this error. Does anyone with some Django experience have a solution? Thanks!

EDIT: Here is the entire urls.py file:

from django.conf.urls.defaults import patterns, include, url

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

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'cms.views.home', name='home'),
    # url(r'^cms/', include('cms.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
)
Andrew De Forest
  • 6,829
  • 14
  • 39
  • 50

1 Answers1

0

Have you tried, http://yourdomain:port/admin ? If you are using the default url, I would try http://127.0.0.1:8000/admin

Kemrop
  • 309
  • 2
  • 4
  • 9