Basic changes, to display nicer names.
[redakcja.git] / redakcja / settings / common.py
index 24a4258..379f5b5 100644 (file)
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 import os.path
 
-PROJECT_ROOT = os.path.realpath(os.path.dirname(__file__))
+PROJECT_ROOT = os.path.realpath(os.path.dirname(os.path.dirname(__file__)))
 
 DEBUG = False
 TEMPLATE_DEBUG = DEBUG
@@ -140,3 +140,17 @@ WL_API_CONFIG = {
 }
 
 # Import localsettings file, which may override settings defined here
+
+try:
+    import logging
+    if os.path.isfile(LOGGING_CONFIG_FILE):
+        import logging.config
+        logging.config.fileConfig(LOGGING_CONFIG_FILE)
+    else:
+        import sys
+        logging.basicConfig(stream=sys.stderr)
+except NameError:
+    print "No logging"
+    pass
+except ImportError as exc:
+    raise