mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-18 04:01:11 +00:00
Call django.setup() before making docs
Django 1.9 requires this line before importing any models. Autodoc imported models to get their docstrings, causing errors in the build process. Fixes #2014.
This commit is contained in:
parent
abe4eb6f28
commit
8ddd9ee537
1 changed files with 2 additions and 0 deletions
|
|
@ -35,6 +35,8 @@ from wagtail.wagtailcore import __version__
|
|||
# Autodoc may need to import some models modules which require django settings
|
||||
# be configured
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'wagtail.tests.settings'
|
||||
import django
|
||||
django.setup()
|
||||
|
||||
# Use SQLite3 database engine so it doesn't attempt to use psycopg2 on RTD
|
||||
os.environ['DATABASE_ENGINE'] = 'django.db.backends.sqlite3'
|
||||
|
|
|
|||
Loading…
Reference in a new issue