#22057: Importing `reverse_lazy` in settings.py leads to ImportError
---------------------------------+--------------------
Reporter: dfunckt | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: master
Severity: Release blocker | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------
Create a new project, add an app with a model and import reverse_lazy in
settings.py. Running {{{./manage.py sqlall myapp}}} raises ImportError
with the following traceback:
{{{
$ ./manage.py sqlall myapp
Traceback (most recent call last):
File "<project>/settings.py", line 2, in <module>
from .settings_local import *
File "<project>/settings_local.py", line 1, in <module>
from .settings_base import *
File "<project>/settings_base.py", line 5, in <module>
from django.core.urlresolvers import reverse_lazy
File "<virtualenv>/src/django/django/core/urlresolvers.py", line 15, in
<module>
from django.http import Http404
File "<virtualenv>/src/django/django/http/__init__.py", line 4, in
<module>
from django.http.response import (HttpResponse, StreamingHttpResponse,
File "<virtualenv>/src/django/django/http/response.py", line 17, in
<module>
from django.core.serializers.json import DjangoJSONEncoder
File "<virtualenv>/src/django/django/core/serializers/__init__.py", line
23, in <module>
from django.core.serializers.base import SerializerDoesNotExist
File "<virtualenv>/src/django/django/core/serializers/base.py", line 6,
in <module>
from django.db import models
ImportError: cannot import name models
}}}
Marking as a release blocker as discussed with apollo13 in IRC.
Cause of this regression is commit:
https://github.com/django/django/commit/0242134d32aa99a54442211ed05576b7061866d1
--
Ticket URL: <https://code.djangoproject.com/ticket/22057>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/050.53b228c3b08b06588db883a1d43a010d%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.