Opened 5 years ago

Closed 5 years ago

#16169 closed Cleanup/optimization (fixed)

Tutorial 2 with error in mysite/urls.py content

Reported by: reinaldo.sanches@… Owned by: nobody
Component: Documentation Version: 1.3
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

On piece of code of headline "Activate the admin site", the 3rd bold line to uncomment is different of startproject auto-generated urls.py:

documentation:

    # Uncomment the next line to enable the admin:
    (r'^admin/', include(admin.site.urls)),
)

auto-generated:

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
)

Documentation is suppressing the url function name.

Attachments (1)

16169.patch (4.8 KB) - added by Aymeric Augustin 5 years ago.

Download all attachments as: .zip

Change History (7)

Changed 5 years ago by Aymeric Augustin

Attachment: 16169.patch added

comment:1 Changed 5 years ago by Aymeric Augustin

Easy pickings: set
Has patch: set
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted
Type: BugCleanup/optimization

Attached patch copies the latest version of the urls.py template in part 2 of the tutorial, and updates parts 2-4 wherever this file is described.

Strictly speaking, the current doc works, but it's better to be consistent.

comment:2 Changed 5 years ago by Julien Phalip

Patch needs improvement: set

Maybe it's best to leave all the "import *" fixes to #14675?

comment:3 Changed 5 years ago by Aymeric Augustin

Patch needs improvement: unset

You're right to say that this ticket overlaps with #14675, but it doesn't make sense to fix half of the present issue and hope that #14675 will fix the other half at some point in the future.

The whole point of this ticket is to make the tutorial consistent with the default template for urls.py. That's why I chose to fix the import lines too. Otherwise, inconsistencies will remain, and even small inconsistencies are unsettling for newcomers.

Since there is no way to track dependencies between tickets in Trac, we can't enforce which one will be committed first... When either this ticket or #14675 gets committed, let's update the patch on the other ticket if necessary.

comment:4 Changed 5 years ago by Julien Phalip

Triage Stage: AcceptedReady for checkin

OK, that makes sense, thanks!

comment:5 Changed 5 years ago by Aymeric Augustin

UI/UX: unset

#16252 was a duplicate.

comment:6 Changed 5 years ago by Jannis Leidel

Resolution: fixed
Status: newclosed

In [16463]:

Fixed #16169 -- Updated tutorial to match the current project template, specifically the urls.py. Thanks, aaugustin.

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