Mostly Javascript refactoring.
[redakcja.git] / platforma / settings.py
index 628b4ef..5485b30 100644 (file)
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
-from os import path
+import os.path
 
-PROJECT_ROOT = path.realpath(path.dirname(__file__))
+PROJECT_ROOT = os.path.realpath(os.path.dirname(__file__))
 
 DEBUG = False
 TEMPLATE_DEBUG = DEBUG
@@ -113,7 +113,8 @@ CAS_LOGOUT_COMPLETELY = True
 COMPRESS_CSS = {
     'detail': {
          'source_filenames': (
-            'css/master.css', 
+            'css/master.css',
+            'css/history.css', 
             'css/html.css',             
             'css/jquery.autocomplete.css',
         ),
@@ -137,8 +138,15 @@ COMPRESS_JS = {
                 'js/jquery.elastic.js',
                 'js/button_scripts.js',
                 'js/slugify.js',
-                'js/xslt.js',
-                'js/main.js',
+                
+                # wiki scripts
+                'js/wiki/wikiapi.js',
+                'js/wiki/base.js',
+                'js/wiki/xslt.js',
+                'js/wiki/history.js',
+                'js/wiki/source_editor.js',
+                'js/wiki/wysiwyg_editor.js',                
+                'js/wiki/main.js',
         ),             
         'output_filename': 'compressed/detail_scripts_?.js',
      },
@@ -171,10 +179,11 @@ INSTALLED_APPS = (
     'debug_toolbar',
     
     'compress',
-
-    'wiki',
+    'south',
     'sorl.thumbnail',
     'filebrowser',
+
+    'wiki',    
     'toolbar',
 )
 
@@ -220,3 +229,19 @@ try:
 except ImportError:
     pass
 
+try:
+    LOGGING_CONFIG_FILE 
+except NameError:
+    LOGGING_CONFIG_FILE = os.path.join(PROJECT_ROOT, 
+                                ('logging.cfg' if not DEBUG else 'logging.cfg.dev'))
+
+try:
+    import logging
+    import logging.config
+
+    logging.config.fileConfig(LOGGING_CONFIG_FILE)    
+except ImportError, exc:
+    import traceback
+    traceback.print_exc()
+    raise
+