django-fobi/examples/simple/settings/test.py

96 lines
2.6 KiB
Python
Raw Normal View History

2016-10-31 01:14:28 +00:00
# Use in `tox`.
from nine import versions
2016-10-31 01:14:28 +00:00
from .base import *
2016-10-31 01:14:28 +00:00
TESTING = True
2016-10-31 01:14:28 +00:00
INSTALLED_APPS = list(INSTALLED_APPS)
2016-10-31 01:14:28 +00:00
if versions.DJANGO_1_5:
try:
INSTALLED_APPS.append(
'south') if 'south' not in INSTALLED_APPS else None
except Exception as err:
2016-10-31 01:14:28 +00:00
pass
elif versions.DJANGO_1_6:
try:
INSTALLED_APPS.append(
'south') if 'south' not in INSTALLED_APPS else None
except Exception as err:
2016-10-31 01:14:28 +00:00
pass
elif versions.DJANGO_1_7:
try:
INSTALLED_APPS.remove('south') if 'south' in INSTALLED_APPS else None
INSTALLED_APPS.remove(
'tinymce') if 'tinymce' in INSTALLED_APPS else None
except Exception as err:
2016-10-31 01:14:28 +00:00
pass
elif versions.DJANGO_1_8:
try:
INSTALLED_APPS.remove('south') if 'south' in INSTALLED_APPS else None
INSTALLED_APPS.remove(
'tinymce') if 'tinymce' in INSTALLED_APPS else None
except Exception as err:
2016-10-31 01:14:28 +00:00
pass
try:
INSTALLED_APPS.remove('admin_tools') \
if 'admin_tools' in INSTALLED_APPS else None
INSTALLED_APPS.remove('admin_tools.menu') \
if 'admin_tools.menu' in INSTALLED_APPS else None
INSTALLED_APPS.remove('admin_tools.dashboard') \
if 'admin_tools.dashboard' in INSTALLED_APPS else None
except Exception as err:
2016-10-31 01:14:28 +00:00
pass
elif versions.DJANGO_1_9:
try:
INSTALLED_APPS.remove('south') if 'south' in INSTALLED_APPS else None
INSTALLED_APPS.remove(
'tinymce') if 'tinymce' in INSTALLED_APPS else None
except Exception as err:
2016-10-31 01:14:28 +00:00
pass
try:
INSTALLED_APPS.remove('admin_tools') \
if 'admin_tools' in INSTALLED_APPS else None
INSTALLED_APPS.remove('admin_tools.menu') \
if 'admin_tools.menu' in INSTALLED_APPS else None
INSTALLED_APPS.remove('admin_tools.dashboard') \
if 'admin_tools.dashboard' in INSTALLED_APPS else None
except Exception as err:
2016-10-31 01:14:28 +00:00
pass
elif versions.DJANGO_1_10:
try:
INSTALLED_APPS.remove('south') if 'south' in INSTALLED_APPS else None
INSTALLED_APPS.remove(
'tinymce') if 'tinymce' in INSTALLED_APPS else None
except Exception as err:
2016-10-31 01:14:28 +00:00
pass
try:
INSTALLED_APPS.remove('admin_tools') \
if 'admin_tools' in INSTALLED_APPS else None
INSTALLED_APPS.remove('admin_tools.menu') \
if 'admin_tools.menu' in INSTALLED_APPS else None
INSTALLED_APPS.remove('admin_tools.dashboard') \
if 'admin_tools.dashboard' in INSTALLED_APPS else None
except Exception as err:
2016-10-31 01:14:28 +00:00
pass
LOGGING = {}
2016-11-10 01:35:53 +00:00
DEBUG_TOOLBAR = False