#28752: Prevent django.setup() from running multiple times
--------------------------------------+------------------------------------
Reporter: pascal chambon | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: 1.11
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by Daniel Hahler):
This would be nice to have indeed.
Pascal, do you plan to provide a patch for this?
btw: the following can be used as a workaround (also used by pytest-
django):
{{{
import django.apps
if not django.apps.apps.ready:
django.setup()
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28752#comment:15>
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/063.aa7d38b0cb9868b346a9fa8fee8bda18%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.