Commits

Amar Šahinović  committed 7b7db73

Better match to Django 1.6 default project template

  • Participants
  • Parent commits e661906

Comments (0)

Files changed (2)

File project_name/project_name/settings/base.py

 import os
 import sys
 
-here = lambda * x: os.path.normpath(os.path.join(os.path.abspath(os.path.dirname(__file__)), *x))
-PROJECT_ROOT = here("..", "..")
-root = lambda * x: os.path.normpath(os.path.join(os.path.abspath(PROJECT_ROOT), *x))
-sys.path.append(PROJECT_ROOT)
+# One level more then the default generated BASE_DIR since we have settings in directory
+BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
+
+root = lambda * x: os.path.normpath(os.path.join(os.path.abspath(BASE_DIR), *x))
+sys.path.append(BASE_DIR)
 
 ADMINS = (
    # ('Your name', 'yourname@example.com'),
 
 TIME_ZONE = 'Europe/Sarajevo'
 LANGUAGE_CODE = 'bs-ba'
-SITE_ID = 1
-USE_I18N = False
+USE_I18N = True
 USE_L10N = True
-USE_TZ = False
+USE_TZ = True
 
 DATE_FORMAT = '%d.%m.%Y.'
 DATETIME_FORMAT = '%d.%m.%Y. %H:%i'
 SECRET_KEY = r'{{ secret_key }}'
 
 MIDDLEWARE_CLASSES = (
-    'django.middleware.common.CommonMiddleware',
     'django.contrib.sessions.middleware.SessionMiddleware',
+    'django.middleware.common.CommonMiddleware',
     'django.middleware.csrf.CsrfViewMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
     'django.contrib.messages.middleware.MessageMiddleware',

File project_name/project_name/settings/testing.py

 # Uncomment this to use notify-send backend. 
 # By default, it uses NullBackend which does nothing
 #AFTERMATH_BACKEND = 'aftermath.backends.NotifySendBackend'
-TEST_DISCOVER_TOP_LEVEL = PROJECT_ROOT
-TEST_DISCOVER_ROOT = PROJECT_ROOT
-TEST_DISCOVER_PATTERN = 'test_*'
 
 STATIC_URL = '/static/'