Opened 18 years ago
Closed 18 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 , 18 years ago
comment:2 by , 18 years ago
| Triage Stage: | Unreviewed → Ready for checkin |
|---|
comment:3 by , 18 years ago
| Summary: | django.urls.shortcut → django.urls.shortcut is unused code, and can be removed. |
|---|
comment:4 by , 18 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 , 18 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Module in question is django.conf.urls.shortcut which appears to be leftover from the initial code import, rev [3].