[Mpuls-commits] r985 - in wasko/branches/2.0: . waskaweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jan 28 16:44:26 CET 2010
Author: bh
Date: 2010-01-28 16:44:24 +0100 (Thu, 28 Jan 2010)
New Revision: 985
Modified:
wasko/branches/2.0/ChangeLog
wasko/branches/2.0/waskaweb/lib/config.py
Log:
* waskaweb/lib/config.py: Fix formatting.
Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog 2010-01-28 15:08:59 UTC (rev 984)
+++ wasko/branches/2.0/ChangeLog 2010-01-28 15:44:24 UTC (rev 985)
@@ -1,5 +1,9 @@
2010-01-28 Bernhard Herzog <bh at intevation.de>
+ * waskaweb/lib/config.py: Fix formatting.
+
+2010-01-28 Bernhard Herzog <bh at intevation.de>
+
* waskaweb/lib/config.py (MpulsConfig.build_defaults): Add some
phases definitions
Modified: wasko/branches/2.0/waskaweb/lib/config.py
===================================================================
--- wasko/branches/2.0/waskaweb/lib/config.py 2010-01-28 15:08:59 UTC (rev 984)
+++ wasko/branches/2.0/waskaweb/lib/config.py 2010-01-28 15:44:24 UTC (rev 985)
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
# (c) 2008 by Intevation GmbH
-# This is Free software under the GPLv3.
+# This is Free software under the GPLv3.
# See LICENSE comming with the source of 'mpuls'
# for details.
#
@@ -9,23 +9,28 @@
#
-import os.path, datetime
-import pylons
+import sys
+import os.path
+import datetime
import logging
-import sys
-
import simplejson as json
+import pylons
+
+
log = logging.getLogger(__name__)
+
def get_revision():
return "2.0-alpha"
+
def get_path(dir, file):
try:
if os.path.isabs(file): return file
- return os.path.join(pylons.config.get('pylons.paths').get('static_files'), dir, file)
+ return os.path.join(pylons.config.get('pylons.paths')
+ .get('static_files'), dir, file)
except:
return None # path building will fail on initial server start/restart
# as pylonspath is empty
@@ -44,10 +49,10 @@
changes.append((ka, vb))
a.update(changes)
+
class MpulsConfig(object):
- def __init__(self, filename = None):
-
+ def __init__(self, filename=None):
self.config = self.build_defaults()
if filename and os.path.isfile(filename):
@@ -103,9 +108,9 @@
# Description of phases
description = [{
- "0" : u"Eingangsdokumentation",
- "1" : u"Case Management",
- "2" : u"Nachbetreuung",
+ "0": u"Eingangsdokumentation",
+ "1": u"Case Management",
+ "2": u"Nachbetreuung",
}]
set('phases', 'description', description)
@@ -116,7 +121,7 @@
"2": ["4","5"],
}]
set('phases', 'pairs', pairs)
- symbols = []
+ symbols = []
set('phases', 'symbols', symbols)
# Succenssors and Predesessors
@@ -127,14 +132,15 @@
}]
set('phases', 'successors', successors)
- # EVALUATIONS
+ # EVALUATIONS
# ------------
#
dummy = {'name': 'Analyse', 'id': '4', 'config': 'eval_analyse.xml'}
enabled_evaluations = [dummy]
set('evaluations', 'enabled', enabled_evaluations)
set('evaluations', 'default-start-date-field', 'erstgespraech')
- set('evaluations', 'default-end-date-field', 'coalesce(datum_cm_ende, now())')
+ set('evaluations', 'default-end-date-field',
+ 'coalesce(datum_cm_ende, now())')
return sections
More information about the Mpuls-commits
mailing list