Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#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 Scot Hacker)

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 Tim Graham, 6 years ago

Component: UncategorizedCore (Other)
Description: modified (diff)
Has patch: set
Summary: Typos in 2.0 default login viewTypo in django/views/templates/default_urlconf.html
Triage Stage: UnreviewedReady for checkin
Type: UncategorizedBug

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.

comment:2 by Tim Graham <timograham@…>, 6 years ago

Resolution: fixed
Status: newclosed

In 6642a646:

Fixed #28735 -- Fixed typo in django/views/templates/default_urlconf.html.

comment:3 by Tim Graham <timograham@…>, 6 years ago

In e3b5977:

[2.0.x] Fixed #28735 -- Fixed typo in django/views/templates/default_urlconf.html.

Backport of 6642a646f07a33cf1b807d398824048f3b17631c from master

comment:5 by Scot Hacker, 6 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 Tim Graham, 6 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 Scot Hacker, 6 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 Tim Graham, 6 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 Scot Hacker, 6 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 Tim Graham, 6 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 Scot Hacker, 6 years ago

Sure - here is the starter project - not much to it. Slightly altered project layout, but nothing that should affect this behavior.

https://github.com/shacker/tangerine

comment:12 by Tim Graham, 6 years ago

In your settings file, you have ROOT_URLCONF = 'blog.urls' which has an empty urlpatterns.

comment:13 by Scot Hacker, 6 years ago

D'oh! Sure enough, that was a leftover. Fixed that and yes, I now get a standard 404. Cheers.

Note: See TracTickets for help on using tickets.
Back to Top