#23621: Module autoreloading doesn't work due to some checks while loading an
app
------------------------------+------------------------------------
Reporter: pashinin | Owner: nobody
Type: Bug | Status: new
Component: Core (Other) | Version: 1.7
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Comment (by loic):
> Considering what Carl just said, I think we should raise a
`RuntimeWarning` (which I believe is loud by default) instead of an
exception in the reloading case.
I checked https://github.com/django/django/pull/3399 but my understanding
of "in the reloading case" would imply something more like (basically a
mix of both PRs):
{{{
message = "Conflicting '%s' models in application '%s': %s and %s." % (
model_name, app_label, app_models[model_name], model)
if (model.__name__ == app_models[model_name].__name__ and
model.__module__ == app_models[model_name].__module__):
warnings.warn(message, RuntimeWarning, stacklevel=2)
else:
raise RuntimeError(message)
}}}
@aaugustin is that what you meant?
--
Ticket URL: <https://code.djangoproject.com/ticket/23621#comment:18>
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/066.345aa2a91f53a14d1256d288254a4eff%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.