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:
Luke Faraone 2013-11-08 20:38:09 +00:00
parent 046c2927ab
commit 20dcc2e036
1 changed files with 5 additions and 0 deletions

View File

@ -17,6 +17,11 @@ import os
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
# file. This includes Django's development server, if the WSGI_APPLICATION
# setting points here.