Django

Code

Ticket #6354 (closed: fixed)

Opened 1 year ago

Last modified 10 months ago

django.conf.urls.shortcut is unused code, and can be removed.

Reported by: tangerine Assigned to: nobody
Milestone: Component: Core framework
Version: SVN Keywords: orphaned urls
Cc: Triage Stage: Ready for checkin
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

Just having a look in the urls package and it seems that django.urls.shortcut is unused by the rest of the codebase and hasn't even been compiled to a .pyc on my django checkout. A quick grep didn't turn up much so I though I'd mention it here in case it needs to be removed.

Attachments

Change History

01/10/08 05:49:56 changed by anonymous

  • needs_better_patch changed.
  • needs_tests changed.
  • needs_docs changed.

Module in question is django.conf.urls.shortcut which appears to be leftover from the initial code import, rev [3].

01/13/08 06:51:31 changed by Simon Greenhill <dev@simon.net.nz>

  • stage changed from Unreviewed to Ready for checkin.

01/13/08 06:51:49 changed by Simon Greenhill <dev@simon.net.nz>

  • summary changed from django.urls.shortcut to django.urls.shortcut is unused code, and can be removed..

01/27/08 22:27:30 changed by gwilson

  • summary changed from django.urls.shortcut is unused code, and can be removed. to django.conf.urls.shortcut is unused code, and can be removed..

While it doesn't appear to be used in Django itself, it does still appear to be valid (the view it points to is still there). In fact, it appears that django.contrib.admin.urls could make use of it:

...
('^r/(\d+)/(.*)/$', 'django.views.defaults.shortcut'),
...

could be changed to:

('^r/', include('django.conf.urls.shortcut'),

after making the changes from [3009]. Looks like we might want to apply the [3009] changes to django.conf.urls.shortcut in case anyone is using it in their projects.

01/27/08 23:36:45 changed by gwilson

  • status changed from new to closed.
  • resolution set to fixed.

(In [7040]) Fixed #6354 -- Fixed url in django/conf/urls/shortcut.py to work with non-integer primary keys (refs #2033) and made use of the URL file in the admin urls.


Add/Change #6354 (django.conf.urls.shortcut is unused code, and can be removed.)




Change Properties
Action