#16788: remove import * from urls.py -------------------------------------+------------------------------------- Reporter: wim@… | Owner: nobody Type: | Status: new Cleanup/optimization | Component: Uncategorized Milestone: | Severity: Normal Version: 1.3 | Keywords: Resolution: | Has patch: 0 Triage Stage: | Needs tests: 0 Unreviewed | Easy pickings: 1 Needs documentation: 0 | Patch needs improvement: 0 | UI/UX: 0 | -------------------------------------+-------------------------------------
Comment (by wim@…): Sorry! Now with code blocks :) Let's face it: import * is ugly and breaks guidelines on what is good practice in Python code. (And pylint complains about it. :) ) Let's send them into oblivion! {{{ import patterns }}} or {{{ import patterns, urls }}} will do in most cases :) {{{ contrib/admindocs/urls.py:from django.conf.urls.defaults import * contrib/auth/urls.py:from django.conf.urls.defaults import * contrib/comments/urls.py:from django.conf.urls.defaults import * contrib/databrowse/urls.py:from django.conf.urls.defaults import * contrib/flatpages/urls.py:from django.conf.urls.defaults import * contrib/staticfiles/urls.py:from django.conf import settings contrib/staticfiles/urls.py:from django.conf.urls.static import static contrib/auth/tests/urls.py:from django.conf.urls.defaults import patterns, url contrib/flatpages/tests/urls.py:from django.conf.urls.defaults import * contrib/formtools/tests/urls.py:from django.conf.urls.defaults import * contrib/messages/tests/urls.py:from django.conf.urls.defaults import * contrib/sitemaps/tests/urls.py:from django.conf.urls.defaults import * }}} -- Ticket URL: <https://code.djangoproject.com/ticket/16788#comment:2> 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 django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.