#2673 closed defect (invalid)
URL matching in tutorial fails
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | contrib.admin | Version: | |
Severity: | blocker | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I'm going through the tutorial at http://www.djangoproject.com/documentation/tutorial2/, but when I activate the admin site and visit the admin page, I see:
Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:
- /django-test/admin/
The current URL, /django-test/admin/, didn't match any of these.
which seems a little perverse given how trivially the url does, in fact, match. Granted I'm running the server on a remote machine rather than using the development server, but this should work, shouldn't it?
Change History (5)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
Have you uncommented the line in the project's urls.py
for the admin URL setup (as directed at the top of tutorial 2)?
comment:3 by , 18 years ago
Yes, I did uncomment the line un urls.py
I tried to use it as-is, but it didn't match. I assume that was becase my project is located at
rather than sitting right at the root of my server. So I changed the pattern from
r'/admin/'
to
r'/django-test/admin/'
As for the leading slash, it is present in the code generated by django in its initial urls.py, but I also tried without it and got the same result.
comment:4 by , 18 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Nevermind; I tried again without the leading slash and now I'm in business. Sorry for the noise!
comment:5 by , 13 years ago
Easy pickings: | unset |
---|---|
UI/UX: | unset |
I am having the same problem, But that fix isn't working. It was working last night when I went to sleep, now I have no idea what is wrong :(
The leading / shouldnt be part of the pattern afaik. Confusing error message i agree.