home / django_tickets / tickets

tickets: 1525

This data as json

id created changetime last_pulled_from_trac stage status component type severity version resolution summary description owner reporter keywords easy has_patch needs_better_patch needs_tests needs_docs ui_ux
1525 2006-03-21 06:40:27 2006-04-12 03:38:22 2022-03-06 03:23:34.443761 Unreviewed closed Core (Other) task minor magic-removal fixed Wildcard imports should be converted to explicit form Wildcard imports are [http://docs.python.org/tut/node8.html#SECTION008410000000000000000 generally frowned upon] in the Python world. There are a handful of these in Django, most of them in urlconfs. Since they have been eschewed everywhere else in the codebase it seems worth cleaning up. In the urlconfs I've tested, '''from django.conf.urls.defaults import patterns, include, handler404, handler500''' seems to be a viable replacement. Occurrences in magic-removal/django, r2542: {{{ $ grep -nr 'import \*' . | grep -v .svn ./conf/project_template/urls.py:1:from django.conf.urls.defaults import * ./conf/urls/admin_password_reset.py:1:from django.conf.urls.defaults import * ./conf/urls/i18n.py:1:from django.conf.urls.defaults import * ./conf/urls/registration.py:1:from django.conf.urls.defaults import * ./conf/urls/shortcut.py:1:from django.conf.urls.defaults import * ./contrib/admin/urls.py:1:from django.conf.urls.defaults import * ./contrib/comments/urls/comments.py:1:from django.conf.urls.defaults import * ./contrib/flatpages/urls.py:1:from django.conf.urls.defaults import * ./core/template_loader.py:7:from django.template.loader import * ./db/models/__init__.py:5:from django.db.models.loading import * ./db/models/__init__.py:9:from django.db.models.fields import * ./db/models/__init__.py:10:from django.db.models.fields.related import * }}} Occurrences in magic-removal/docs, r2542: {{{ $ grep -nr 'import \*' . | grep -v .svn ./generic_views.txt:34: from django.conf.urls.defaults import * ./overview.txt:162: from django.conf.urls.defaults import * ./static_files.txt:102: from django.conf.urls.defaults import * ./syndication_feeds.txt:52: from django.conf.urls.defaults import * ./syndication_feeds.txt:311: from django.conf.urls.defaults import * ./tutorial03.txt:73: from django.conf.urls.defaults import * ./tutorial03.txt:330: from django.conf.urls.defaults import * ./tutorial04.txt:159: from django.conf.urls.defaults import * ./tutorial04.txt:170: from django.conf.urls.defaults import * ./url_dispatch.txt:56: from django.conf.urls.defaults import * ./url_dispatch.txt:67: * ``from django.conf.urls.defaults import *`` makes the ``patterns`` ./url_dispatch.txt:170:Convention is to use ``from django.conf.urls.defaults import *`` at the top of ./url_dispatch.txt:259: from django.conf.urls.defaults import * ./url_dispatch.txt:274: from django.conf.urls.defaults import * ./url_dispatch.txt:296: from django.conf.urls.defaults import * }}} adrian pb@e-scribe.com   0 0 0 0 0 0
Powered by Datasette · Queries took 1.18ms