Updated urls.py to use new-style imports. #11

merged 1 commit into from Mar 24, 2013


None yet
4 participants

freakboy3742 commented Mar 11, 2013

With the release of Django 1.5, the import format for urls.py now raises a noisy warning. Supporting the older format is no longer required, as all the officially supported versions of Django now provide the new format.

jezdez added a commit that referenced this pull request Mar 24, 2013

Merge pull request #11 from freakboy3742/develop
Updated urls.py to use new-style imports.

@jezdez jezdez merged commit 8b91407 into jazzband:develop Mar 24, 2013


jezdez commented Mar 24, 2013

Released as 0.9.2 now! Thanks @freakboy3742 :)

I think it should be:
from django.conf.urls.defaults import patterns, url


freakboy3742 replied Mar 26, 2013

@noelph Incorrect. The defaults module was deprecated in Django 1.4, and will no longer exist in Django 1.6.

Oh I see. I'm on 1.3. I manually edited the module in the site-packages. Thanks for the info.

katfang commented Apr 7, 2013

It would be nice to note somewhere official that this update causes things to break in Django 1.3. (Such as on https://pypi.python.org/pypi/django-robots/.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment