#16788: remove import * from urls.py
-------------------------------------+-------------------------------------
Reporter: wim@… | Owner: draix
Type: | Status: assigned
Cleanup/optimization | Component: Core (Other)
Milestone: | Severity: Normal
Version: 1.3 | Keywords:
Resolution: | Has patch: 0
Triage Stage: Accepted | Needs tests: 0
Needs documentation: 0 | Easy pickings: 1
Patch needs improvement: 0 |
UI/UX: 0 |
-------------------------------------+-------------------------------------
Changes (by draix):
* status: new => assigned
* owner: nobody => draix
* component: Uncategorized => Core (Other)
* stage: Unreviewed => Accepted
Comment:
That's correct, I'm adding some tests also to your observation:
{{{
$ grep -R "import \*" * |grep -v ".svn" |grep "/urls.py"
django/contrib/admindocs/urls.py:from django.conf.urls.defaults import *
django/contrib/auth/urls.py:from django.conf.urls.defaults import *
django/contrib/comments/urls.py:from django.conf.urls.defaults import *
django/contrib/databrowse/urls.py:from django.conf.urls.defaults import *
django/contrib/flatpages/tests/urls.py:from django.conf.urls.defaults
import *
django/contrib/flatpages/urls.py:from django.conf.urls.defaults import *
django/contrib/formtools/tests/urls.py:from django.conf.urls.defaults
import *
django/contrib/formtools/tests/wizard/wizardtests/urls.py:from
django.conf.urls.defaults import *
django/contrib/gis/tests/geoapp/urls.py:from django.conf.urls.defaults
import *
django/contrib/messages/tests/urls.py:from django.conf.urls.defaults
import *
django/contrib/sitemaps/tests/urls.py:from django.conf.urls.defaults
import *
tests/modeltests/test_client/urls.py:from django.conf.urls.defaults import
*
tests/regressiontests/admin_views/urls.py:from django.conf.urls.defaults
import *
tests/regressiontests/admin_widgets/urls.py:from django.conf.urls.defaults
import *
tests/regressiontests/comment_tests/urls.py:from django.conf.urls.defaults
import *
tests/regressiontests/conditional_processing/urls.py:from
django.conf.urls.defaults import *
tests/regressiontests/context_processors/urls.py:from
django.conf.urls.defaults import *
tests/regressiontests/file_uploads/urls.py:from django.conf.urls.defaults
import *
tests/regressiontests/generic_inline_admin/urls.py:from
django.conf.urls.defaults import *
tests/regressiontests/generic_views/urls.py:from django.conf.urls.defaults
import *
tests/regressiontests/middleware_exceptions/urls.py:from
django.conf.urls.defaults import *
tests/regressiontests/model_permalink/urls.py:from
django.conf.urls.defaults import *
tests/regressiontests/special_headers/urls.py:from
django.conf.urls.defaults import *
tests/regressiontests/syndication/urls.py:from django.conf.urls.defaults
import *
tests/regressiontests/templates/urls.py:from django.conf.urls.defaults
import *
tests/regressiontests/test_client_regress/urls.py:from
django.conf.urls.defaults import *
tests/regressiontests/urlpatterns_reverse/urls.py:from
django.conf.urls.defaults import *
tests/regressiontests/views/urls.py:from django.conf.urls.defaults import
*
tests/urls.py:from django.conf.urls.defaults import *
}}}
Well, actually we have lots of work to do regarded to this topic on the
whole Django code base.
Doing some research on the trunk codebase:
{{{
$ grep -R "import \*" * |grep -v ".svn" |wc -l
251
}}}
I'll start working on removing "import *" 's form urls.py, but maybe we
also should also move to other areas of the code on this topic.
--
Ticket URL: <https://code.djangoproject.com/ticket/16788#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.