Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#24635 closed Cleanup/optimization (fixed)

New project provides deprecated examples

Reported by: jambonrose Owned by: jambonrose
Component: Core (Management commands) Version: 1.8
Severity: Normal Keywords: startproject templates
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

As detailed in the Django 1.8 release notes, namespace strings in URL patterns are considered deprecated.

However, when creating a new project in 1.8 with django-admin startproject, the default template displays:

     url(r'^$', '{{ project_name }}.views.home', name='home'),

The default example provided in project_name/urls.py should follow best practice.

Change History (6)

comment:1 by Tim Graham, 10 years ago

Triage Stage: UnreviewedAccepted

There has been some sensitivity to changing the project template late in the release cycle (now it's after the release) since other tutorials rely on it, so maybe we have to limit this fix to 1.9.

comment:2 by Andrew Godwin, 10 years ago

I do think this would make sense to backport, though, given that the examples use a deprecated-in-1.8 style; the project template should at least be self-consistent, IMO.

comment:3 by jambonrose, 10 years ago

Owner: changed from nobody to jambonrose
Status: newassigned

comment:4 by Tim Graham, 10 years ago

Has patch: set
Triage Stage: AcceptedReady for checkin

comment:5 by Tim Graham <timograham@…>, 10 years ago

Resolution: fixed
Status: assignedclosed

In 0b5abb03:

Fixed #24635 -- Updated deprecated urls.py examples in default project template.

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

In b1d8320:

[1.8.x] Fixed #24635 -- Updated deprecated urls.py examples in default project template.

Backport of 0b5abb03218ff0c575cee0c83e446bab81cbfadd from master

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