#19605 closed Cleanup/optimization (fixed)
Unnecessary import in code examples from the docs
| Reported by: | sergzach | Owned by: | nobody |
|---|---|---|---|
| Component: | Documentation | Version: | 1.5-beta-1 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | no |
Description
The next sample fragment has unnecessary imports of 'url' and 'include':
from django.conf.urls import patterns, url, include
urlpatterns = patterns('',
(r'^articles/2003/$', 'news.views.special_case_2003'),
(r'^articles/(\d{4})/$', 'news.views.year_archive'),
(r'^articles/(\d{4})/(\d{2})/$', 'news.views.month_archive'),
(r'^articles/(\d{4})/(\d{2})/(\d+)/$', 'news.views.article_detail'),
)
The link: https://docs.djangoproject.com/en/1.5/topics/http/urls/#example
Change History (5)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
| Easy pickings: | set |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
| Type: | Uncategorized → Cleanup/optimization |
I'm guessing from django.conf.urls import import * was replaced generically.
comment:3 by , 13 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
There are more such examples on the page.