1
0
Fork 0
mirror of https://github.com/yweber/lodel2.git synced 2026-07-29 01:03:28 +02:00

Code cleaning and adding features to generate models in application only when not testing with the MH

This commit is contained in:
Yann 2015-09-16 10:37:23 +02:00
commit 8bea52d740
4 changed files with 77 additions and 41 deletions

View file

@ -1,3 +1,4 @@
import os
from Lodel.settings.defaults import *
DEBUG = True
@ -7,6 +8,9 @@ if DEBUG:
else:
from Lodel.settings.production import *
if 'LODEL_MIGRATION_HANDLER_TESTS' in os.environ:
from Lodel.settings.migrations import *
try:
from Lodel.settings.locale import *
except ImportError:

View file

@ -58,6 +58,7 @@ INSTALLED_APPS = (
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'LodelTestInstance',
)
MIDDLEWARE_CLASSES = (
@ -77,12 +78,25 @@ WSGI_APPLICATION = 'Lodel.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'lodel2',
'USER': 'lodel',
'PASSWORD': 'bruno',
'HOST': 'localhost',
}
}
"""
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
"""
# Internationalization
# https://docs.djangoproject.com/en/1.7/topics/i18n/
@ -102,3 +116,6 @@ USE_TZ = True
# https://docs.djangoproject.com/en/1.7/howto/static-files/
STATIC_URL = '/static/'
# Lodel configurations
LODEL_MIGRATION_HANDLER_TESTS = True