mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 01:16:19 +00:00
Import zerver.models in wsgi.py
Because import_module does not correctly handle safe circular imports we need to import zerver.models first before the middleware tries to import it. (imported from commit 1afebd8c950c44c8d136b0b63a09319ccef02555)
This commit is contained in:
@@ -17,6 +17,11 @@ import os
|
|||||||
|
|
||||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "zproject.settings")
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "zproject.settings")
|
||||||
|
|
||||||
|
# Because import_module does not correctly handle safe circular imports we
|
||||||
|
# need to import zerver.models first before the middleware tries to import it.
|
||||||
|
|
||||||
|
import zerver.models
|
||||||
|
|
||||||
# This application object is used by any WSGI server configured to use this
|
# This application object is used by any WSGI server configured to use this
|
||||||
# file. This includes Django's development server, if the WSGI_APPLICATION
|
# file. This includes Django's development server, if the WSGI_APPLICATION
|
||||||
# setting points here.
|
# setting points here.
|
||||||
|
|||||||
Reference in New Issue
Block a user