Browse Source

small improv for config

Rafał Pitoń 8 years ago
parent
commit
0312496172
2 changed files with 5 additions and 24 deletions
  1. 3 22
      misago/conf/defaults.py
  2. 2 2
      misago/project_template/project_name/settings.py

+ 3 - 22
misago/conf/defaults.py

@@ -26,13 +26,6 @@ INSTALLED_APPS = (
 )
 """
 
-# Build paths inside the project like this: os.path.join(MISAGO_BASE_DIR, ...)
-import os
-
-
-MISAGO_BASE_DIR = os.path.dirname(os.path.dirname(__file__))
-
-
 # Default JS debug to false
 # This setting used exclusively by test runner and isn't part of public API
 _MISAGO_JS_DEBUG = False
@@ -41,6 +34,9 @@ _MISAGO_JS_DEBUG = False
 # Application definition
 
 INSTALLED_APPS = (
+    # Load Misago's locale/templates/static
+    'misago',
+
     'django.contrib.admin',
     # Keep misago.users above django.contrib.auth
     # so our management commands take precedence over theirs
@@ -156,21 +152,6 @@ MISAGO_THREAD_TYPES = (
 )
 
 
-# Register Misago directories
-
-LOCALE_PATHS = (
-    os.path.join(MISAGO_BASE_DIR, 'locale'),
-)
-
-STATICFILES_DIRS = (
-    os.path.join(MISAGO_BASE_DIR, 'static'),
-)
-
-TEMPLATE_DIRS = (
-    os.path.join(MISAGO_BASE_DIR, 'templates'),
-)
-
-
 # Internationalization
 
 USE_I18N = True

+ 2 - 2
misago/project_template/project_name/settings.py

@@ -94,11 +94,11 @@ STATIC_ROOT = os.path.join(BASE_DIR, 'static')
 # assets and templates to your site
 STATICFILES_DIRS = (
     os.path.join(BASE_DIR, 'theme', 'static'),
-) + STATICFILES_DIRS
+)
 
 TEMPLATE_DIRS = (
     os.path.join(BASE_DIR, 'theme', 'templates'),
-) + TEMPLATE_DIRS
+)
 
 
 # SECURITY WARNING: keep the secret key used in production secret!