settings: activate south with sqlite if FORCE_SOUTH is defined in the environment

This commit is contained in:
Benjamin Dauvergne 2013-12-02 10:27:34 +01:00
parent fca12ab15e
commit 87af9df45a
2 changed files with 10 additions and 1 deletions

8
README
View File

@ -130,3 +130,11 @@ MAX_ENTITY_FILTER_DEPTH
USE_PDF_VIEWER
Utiliser la visionneuse de PDF, par défaut False.
Environment
-----------
FORCE_SOUTH
If this variable is defined in the environment, you can use south with
sqlite.

View File

@ -1,5 +1,6 @@
# Django settings for polynum project.
import os
import os.path
import django.conf.global_settings as DEFAULT_SETTINGS
from django.core.urlresolvers import reverse_lazy
@ -218,7 +219,7 @@ except:
pass
# use South, unless if database is sqlite3
if DATABASES['default']['ENGINE'] != 'django.db.backends.sqlite3':
if DATABASES['default']['ENGINE'] != 'django.db.backends.sqlite3' or 'FORCE_SOUTH' in os.environ:
INSTALLED_APPS = ('south',) + INSTALLED_APPS
# CAS