fix regex for project name
[osm/LW-UI.git] / sf_t3d / settings.py
index 53bde44..753537a 100644 (file)
@@ -21,11 +21,12 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
 
 # SECURITY WARNING: keep the secret key used in production secret!
 SECRET_KEY = 'o5+o2jv(3-dqr(&ia#-@79cgr%xi*s+6xjws^8cxp211ge#buf'
-
-# SECURITY WARNING: don't run with debug turned on in production!
-DEBUG = True
-
-ALLOWED_HOSTS = []
+if os.getenv('DJANGO_ENV') == 'prod':
+    DEBUG = False
+else:
+    DEBUG = True
+    print DEBUG
+ALLOWED_HOSTS = ['*']
 
 AUTH_USER_MODEL = "authosm.OsmUser"
 
@@ -51,6 +52,7 @@ INSTALLED_APPS = [
     'vimhandler',
     'instancehandler',
     'sdnctrlhandler',
+    'userhandler'
 
 ]
 
@@ -86,6 +88,7 @@ TEMPLATES = [
             os.path.join(BASE_DIR, 'vimhandler', 'template'),
             os.path.join(BASE_DIR, 'instancehandler', 'template'),
             os.path.join(BASE_DIR, 'sdnctrlhandler', 'template'),
+            os.path.join(BASE_DIR, 'userhandler', 'templates'),
         ],
         'APP_DIRS': True,
         'OPTIONS': {
@@ -157,20 +160,21 @@ USE_TZ = True
 # https://docs.djangoproject.com/en/1.9/howto/static-files/
 
 STATIC_URL = '/static/'
-
-STATICFILES_FINDERS = (
-    'django.contrib.staticfiles.finders.FileSystemFinder',
-    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
-    'django.contrib.staticfiles.finders.DefaultStorageFinder'
-)
-
-STATICFILES_DIRS = (
-    # Put strings here, like "/home/html/static" or "C:/www/django/static".
-    # Always use forward slashes, even on Windows.
-    # Don't forget to use absolute paths, not relative paths.
-    os.path.join(BASE_DIR, "static"),
-)
+if DEBUG:
+    STATICFILES_FINDERS = (
+        'django.contrib.staticfiles.finders.FileSystemFinder',
+        'django.contrib.staticfiles.finders.AppDirectoriesFinder',
+        'django.contrib.staticfiles.finders.DefaultStorageFinder'
+    )
+    STATICFILES_DIRS = (
+        # Put strings here, like "/home/html/static" or "C:/www/django/static".
+        # Always use forward slashes, even on Windows.
+        # Don't forget to use absolute paths, not relative paths.
+        os.path.join(BASE_DIR, "static"),
+    )
+else:
+    STATIC_ROOT = os.path.join(BASE_DIR, "static/")
 
 LOCALE_PATHS = (
     os.path.join(BASE_DIR, 'locale'),
-)
\ No newline at end of file
+)