#28735 closed Bug (fixed)
Typo in django/views/templates/default_urlconf.html
Reported by: | Scot Hacker | Owned by: | nobody |
---|---|---|---|
Component: | Core (Other) | Version: | 2.0 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description (last modified by )
Default login view says:
You are seeing this page because DEBUG=True is in your settings file and have not configured any URLs.
Missing the word "you" and it may not be correct that dev has not configured any URLs. May be that dev has just not configured URLs for *this* URL.
Will submit a PR to correct this text to :
You are seeing this page because DEBUG=True is in your settings file and you have not configured any URLs for this page.
Could also be "for this URL" or "for this view". Thoughts?
Change History (12)
comment:1 by , 7 years ago
Component: | Uncategorized → Core (Other) |
---|---|
Description: | modified (diff) |
Has patch: | set |
Summary: | Typos in 2.0 default login view → Typo in django/views/templates/default_urlconf.html |
Triage Stage: | Unreviewed → Ready for checkin |
Type: | Uncategorized → Bug |
comment:5 by , 7 years ago
Description: | modified (diff) |
---|
The reason I made the distinction about "for this page/URL" is that in my case, I had configured lots of URLs, I just had not configured one for "/". So the language "you have not configured *any* URLs" did not feel correct. But that's probably an uncommon use case.
comment:6 by , 7 years ago
I'd be curious to see your URLconf -- the intention is to display the "It worked" page only if you haven't configured other URLs.
comment:7 by , 7 years ago
The contents of my urls.py :
urlpatterns = [ path('admin/', admin.site.urls), path('users/', include('users.urls')), path('blog/', include('blog.urls')) ]
(maybe admin.site.urls and includes are excluded from the calculation?)
comment:8 by , 7 years ago
When you access a page like "/" with that URLconf, you see the "The install worked" page? I can't reproduce it.
comment:9 by , 7 years ago
Correct. With this urls.py, I get the default "It worked!" view. Using Django 2.0b1 in a pipenv environment.
comment:10 by , 7 years ago
Perhaps you can provide a sample project. I can reproduce if only path('admin/', admin.site.urls),
is in urlpatterns
(this is expected since that's the "default URLconf from startproject
" case) but after adding another include()
, I see the "technical 404" view.
comment:11 by , 7 years ago
Sure - here is the starter project - not much to it. Slightly altered project layout, but nothing that should affect this behavior.
comment:12 by , 7 years ago
In your settings file, you have ROOT_URLCONF = 'blog.urls'
which has an empty urlpatterns
.
comment:13 by , 7 years ago
D'oh! Sure enough, that was a leftover. Fixed that and yes, I now get a standard 404. Cheers.
As I mentioned on the PR, I don't think "for this page" is correct (that language isn't present in older versions of Django). The
default_urlconf
view is used if the URLconf is empty or if the default URLconf is present.