Opened 4 years ago

Closed 4 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 aaugustin 4 years ago.

Download all attachments as: .zip

Change History (7)

Changed 4 years ago by aaugustin

comment:1 Changed 4 years ago by aaugustin

  • Easy pickings set
  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Type changed from Bug to Cleanup/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 4 years ago by julien

  • Patch needs improvement set

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

comment:3 Changed 4 years ago by aaugustin

  • 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 4 years ago by julien

  • Triage Stage changed from Accepted to Ready for checkin

OK, that makes sense, thanks!

comment:5 Changed 4 years ago by aaugustin

  • UI/UX unset

#16252 was a duplicate.

comment:6 Changed 4 years ago by jezdez

  • Resolution set to fixed
  • Status changed from new to closed

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