#23621: Module autoreloading doesn't work due to some checks while loading an
app
-------------------------------+--------------------
Reporter: pashinin | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.7
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
When in IPython shell: {{{./manage.py shell}}} module autoreloading
doesn't work and gives this error:
{{{
[autoreload of db.models failed: Traceback (most recent call last):
File "/pyenvs/p3/lib/python3.4/site-
packages/IPython/extensions/autoreload.py", line 247, in check
superreload(m, reload, self.old_objects)
RuntimeError: Conflicting 'language' models in application 'db': <class
'db.models.Language'> and <class 'db.models.Language'>.
}}}
The problem is - when reloading a module - it has absolutely the same path
and it cannot be changed to prevent a confusion with different modules
(what this exception tries to do)
I tried this for example:
{{{
if model_name in app_models and str(app_models[model_name]) != str(model):
...
}}}
Found it here:
https://github.com/django/django/commit/aff57793b46e108c6e48d5ce3b889bf90b513df9
#diff-e0a696d19bf764562a439d3080a30fda
Pull request: https://github.com/django/django/pull/3310
--
Ticket URL: <https://code.djangoproject.com/ticket/23621>
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/051.ce17978c2a622542be8dfeafd025d16b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.