Opened 17 years ago

Closed 17 years ago

#6354 closed (fixed)

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

Reported by: tangerine Owned by: nobody
Component: Core (Other) Version: dev
Severity: Keywords: orphaned urls
Cc: Triage Stage: Ready for checkin
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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.

Change History (5)

comment:1 by anonymous, 17 years ago

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

comment:2 by Simon Greenhill <dev@…>, 17 years ago

Triage Stage: UnreviewedReady for checkin

comment:3 by Simon Greenhill <dev@…>, 17 years ago

Summary: django.urls.shortcutdjango.urls.shortcut is unused code, and can be removed.

comment:4 by Gary Wilson, 17 years ago

Summary: django.urls.shortcut is unused code, and can be removed.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.

comment:5 by Gary Wilson, 17 years ago

Resolution: fixed
Status: newclosed

(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.

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