kopia lustrzana https://github.com/wagtail/wagtail
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.pull/1990/merge
rodzic
abe4eb6f28
commit
8ddd9ee537
|
@ -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'
|
||||
|
|
Ładowanie…
Reference in New Issue