Opened 7 years ago

Last modified 7 years ago

#28537 closed Bug

Urlpatterns don't work. — at Version 1

Reported by: lao zzzi Owned by: nobody
Component: Core (URLs) Version: 1.11
Severity: Normal Keywords: urlpatterns
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by lao zzzi)

mysite.urls

from django.conf.urls import include, url
from django.contrib import admin

urlpatterns = [
    url(r'^polls/', include('polls.urls')),
    url(r'^admin/', admin.site.urls),
]

when I run http://localhost:8000/polls/ it shows error 404 with description
"Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:
admin/
The current path, polls/, didn't match any of these."

So, it doesn't check the first pattern like it wasn't exist. What have I done wrong?

Change History (1)

comment:1 by lao zzzi, 7 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top