[Mpuls-commits] r3373 - in base/trunk: . mpulsweb/controllers mpulsweb/lib mpulsweb/model
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Aug 11 11:54:37 CEST 2010
Author: bh
Date: 2010-08-11 11:54:34 +0200 (Wed, 11 Aug 2010)
New Revision: 3373
Modified:
base/trunk/ChangeLog
base/trunk/mpulsweb/controllers/administration.py
base/trunk/mpulsweb/controllers/auth.py
base/trunk/mpulsweb/controllers/case.py
base/trunk/mpulsweb/controllers/casedocument.py
base/trunk/mpulsweb/controllers/evaluate.py
base/trunk/mpulsweb/controllers/formularpage.py
base/trunk/mpulsweb/controllers/mpuls.py
base/trunk/mpulsweb/controllers/news.py
base/trunk/mpulsweb/controllers/repeatgroup.py
base/trunk/mpulsweb/lib/dialogs.py
base/trunk/mpulsweb/lib/helpers.py
base/trunk/mpulsweb/lib/navigation.py
base/trunk/mpulsweb/lib/security.py
base/trunk/mpulsweb/lib/validators.py
base/trunk/mpulsweb/model/user.py
Log:
* mpulsweb/controllers/administration.py,
mpulsweb/controllers/auth.py, mpulsweb/controllers/case.py,
mpulsweb/controllers/casedocument.py,
mpulsweb/controllers/evaluate.py,
mpulsweb/controllers/formularpage.py,
mpulsweb/controllers/mpuls.py, mpulsweb/controllers/news.py,
mpulsweb/controllers/repeatgroup.py, mpulsweb/lib/dialogs.py,
mpulsweb/lib/navigation.py, mpulsweb/lib/validators.py,
mpulsweb/model/user.py: Import session from mpulsweb.lib.base
instead of from pylons. This a preparation for the introduction
of he mpuls specific session wrapper in base.
* mpulsweb/lib/helpers.py, mpulsweb/lib/security.py: Still
importing session from pylons here, so add a comment for this.
This will be fixed when the mpuls session is introduced.
Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog 2010-08-10 20:16:22 UTC (rev 3372)
+++ base/trunk/ChangeLog 2010-08-11 09:54:34 UTC (rev 3373)
@@ -1,3 +1,21 @@
+2010-08-11 Bernhard Herzog <bh at intevation.de>
+
+ * mpulsweb/controllers/administration.py,
+ mpulsweb/controllers/auth.py, mpulsweb/controllers/case.py,
+ mpulsweb/controllers/casedocument.py,
+ mpulsweb/controllers/evaluate.py,
+ mpulsweb/controllers/formularpage.py,
+ mpulsweb/controllers/mpuls.py, mpulsweb/controllers/news.py,
+ mpulsweb/controllers/repeatgroup.py, mpulsweb/lib/dialogs.py,
+ mpulsweb/lib/navigation.py, mpulsweb/lib/validators.py,
+ mpulsweb/model/user.py: Import session from mpulsweb.lib.base
+ instead of from pylons. This a preparation for the introduction
+ of he mpuls specific session wrapper in base.
+
+ * mpulsweb/lib/helpers.py, mpulsweb/lib/security.py: Still
+ importing session from pylons here, so add a comment for this.
+ This will be fixed when the mpuls session is introduced.
+
2010-08-10 Bernhard Herzog <bh at intevation.de>
* mpulsweb/lib/app_globals.py (Globals.__init__): Do not
Modified: base/trunk/mpulsweb/controllers/administration.py
===================================================================
--- base/trunk/mpulsweb/controllers/administration.py 2010-08-10 20:16:22 UTC (rev 3372)
+++ base/trunk/mpulsweb/controllers/administration.py 2010-08-11 09:54:34 UTC (rev 3373)
@@ -3,11 +3,11 @@
import logging
import formencode
-from pylons import request, session, tmpl_context as c
+from pylons import request, tmpl_context as c
from mpulsweb.lib.translation import _
from mpulsweb.lib.db import db
-from mpulsweb.lib.base import BaseController, render, redirect_to
+from mpulsweb.lib.base import BaseController, render, redirect_to, session
from mpulsweb.lib.helpers import url_for
from mpulsweb.lib.security import checkRole, getDbName
from mpulsweb.lib.validators import ValidatorStateObject, NewUserGroupForm, \
Modified: base/trunk/mpulsweb/controllers/auth.py
===================================================================
--- base/trunk/mpulsweb/controllers/auth.py 2010-08-10 20:16:22 UTC (rev 3372)
+++ base/trunk/mpulsweb/controllers/auth.py 2010-08-11 09:54:34 UTC (rev 3373)
@@ -1,10 +1,10 @@
import logging
import md5
-from pylons import request, response, session, tmpl_context as c
+from pylons import request, response, tmpl_context as c
from pylons.controllers.util import redirect_to
-from mpulsweb.lib.base import BaseController, render
+from mpulsweb.lib.base import BaseController, render, session
from mpulsweb.lib.security import checkLogin, generateID, userIdentity
log = logging.getLogger(__name__)
Modified: base/trunk/mpulsweb/controllers/case.py
===================================================================
--- base/trunk/mpulsweb/controllers/case.py 2010-08-10 20:16:22 UTC (rev 3372)
+++ base/trunk/mpulsweb/controllers/case.py 2010-08-11 09:54:34 UTC (rev 3373)
@@ -3,11 +3,11 @@
import logging
import formencode
-from pylons import request, session, tmpl_context as c, app_globals as g
+from pylons import request, tmpl_context as c, app_globals as g
from pylons.controllers.util import redirect_to
from mpulsweb.lib.translation import _, ungettext
-from mpulsweb.lib.base import BaseController, render, h
+from mpulsweb.lib.base import BaseController, render, session, h
from mpulsweb.lib.security import checkRole
from mpulsweb.lib.dialogs import checkPrivacyStatement
from mpulsweb.lib.validators import SetStandinForm, SetEditorForm, NewCaseForm
Modified: base/trunk/mpulsweb/controllers/casedocument.py
===================================================================
--- base/trunk/mpulsweb/controllers/casedocument.py 2010-08-10 20:16:22 UTC (rev 3372)
+++ base/trunk/mpulsweb/controllers/casedocument.py 2010-08-11 09:54:34 UTC (rev 3373)
@@ -5,11 +5,11 @@
import paste
-from pylons import request, session, tmpl_context as c
+from pylons import request, tmpl_context as c
from pylons.controllers.util import redirect_to
from mpulsweb.lib.translation import _, ungettext
-from mpulsweb.lib.base import BaseController, render
+from mpulsweb.lib.base import BaseController, render, session
from mpulsweb.lib.validators import UploadCaseDocumentForm
from mpulsweb.lib.security import checkRole
import mpulsweb.lib.helpers as h
Modified: base/trunk/mpulsweb/controllers/evaluate.py
===================================================================
--- base/trunk/mpulsweb/controllers/evaluate.py 2010-08-10 20:16:22 UTC (rev 3372)
+++ base/trunk/mpulsweb/controllers/evaluate.py 2010-08-11 09:54:34 UTC (rev 3373)
@@ -4,7 +4,7 @@
import traceback
import pylons
-from pylons import session, g, c
+from pylons import g, c
from mpulsweb.lib.translation import _
from libmpuls.evaluation.config import EvaluationConfig
@@ -12,7 +12,7 @@
from libmpuls.evaluation.export import EvaluationExportXML, \
EvaluationExportCSV, EvaluationExportHTML
-from mpulsweb.lib.base import BaseController, render, request, response
+from mpulsweb.lib.base import BaseController, render, request, response, session
from mpulsweb.lib.db import db
from mpulsweb.lib.helpers import format_date
from mpulsweb.lib.validators import EvaluationFormValidator
Modified: base/trunk/mpulsweb/controllers/formularpage.py
===================================================================
--- base/trunk/mpulsweb/controllers/formularpage.py 2010-08-10 20:16:22 UTC (rev 3372)
+++ base/trunk/mpulsweb/controllers/formularpage.py 2010-08-11 09:54:34 UTC (rev 3373)
@@ -7,7 +7,7 @@
import formencode
-from pylons import request, session, c
+from pylons import request, c
from pylons import g
from pylons.controllers.util import abort, redirect_to
@@ -21,7 +21,7 @@
from mpulsweb.lib.db import PostgresDBInterface
from mpulsweb.lib.navigation import mark_folderopen
-from mpulsweb.lib.base import BaseController, render
+from mpulsweb.lib.base import BaseController, render, session
from mpulsweb.lib.renderer import ViewRenderer, RepeatGroupRenderer, \
ErrorRenderer, apply_hidden_booleans, get_child_num
from mpulsweb.lib.helpers import url_for, dd_mm_YYYY as format_date
Modified: base/trunk/mpulsweb/controllers/mpuls.py
===================================================================
--- base/trunk/mpulsweb/controllers/mpuls.py 2010-08-10 20:16:22 UTC (rev 3372)
+++ base/trunk/mpulsweb/controllers/mpuls.py 2010-08-11 09:54:34 UTC (rev 3373)
@@ -1,11 +1,11 @@
import logging
-from pylons import session, tmpl_context as c, app_globals as g
+from pylons import tmpl_context as c, app_globals as g
from mpulsweb.model.news import NewsList
from mpulsweb.model.appointment import GlobalAppointmentOverview, \
CaseAppointmentOverview, MaxSaveTimeReminderOverview, CaseReminderOverview
-from mpulsweb.lib.base import BaseController, render
+from mpulsweb.lib.base import BaseController, render, session
import mpulsweb.lib.helpers as h
Modified: base/trunk/mpulsweb/controllers/news.py
===================================================================
--- base/trunk/mpulsweb/controllers/news.py 2010-08-10 20:16:22 UTC (rev 3372)
+++ base/trunk/mpulsweb/controllers/news.py 2010-08-11 09:54:34 UTC (rev 3373)
@@ -2,12 +2,12 @@
import logging
-from pylons import session, tmpl_context as c
+from pylons import tmpl_context as c
from pylons.controllers.util import redirect_to
from mpulsweb.lib.translation import _, ungettext
from mpulsweb.lib.helpers import url_for
-from mpulsweb.lib.base import BaseController, render
+from mpulsweb.lib.base import BaseController, session, render
from mpulsweb.model.user import UserObject
Modified: base/trunk/mpulsweb/controllers/repeatgroup.py
===================================================================
--- base/trunk/mpulsweb/controllers/repeatgroup.py 2010-08-10 20:16:22 UTC (rev 3372)
+++ base/trunk/mpulsweb/controllers/repeatgroup.py 2010-08-11 09:54:34 UTC (rev 3373)
@@ -2,13 +2,13 @@
import logging
-from pylons import session, c, g
+from pylons import c, g
from mpulsweb.lib.translation import _
from pylons.controllers.util import abort
from formed.instance.backends.postgres import DBFactory as InstanceFactory
-from mpulsweb.lib.base import BaseController, render
+from mpulsweb.lib.base import BaseController, render, session
import mpulsweb.lib.helpers as h
from mpulsweb.lib.db import PostgresDBInterface
from mpulsweb.lib.navigation import get_navigation
Modified: base/trunk/mpulsweb/lib/dialogs.py
===================================================================
--- base/trunk/mpulsweb/lib/dialogs.py 2010-08-10 20:16:22 UTC (rev 3372)
+++ base/trunk/mpulsweb/lib/dialogs.py 2010-08-11 09:54:34 UTC (rev 3373)
@@ -5,10 +5,10 @@
from webob.exc import HTTPNotFound
-from pylons import request, session, tmpl_context as c, app_globals as g
+from pylons import request, tmpl_context as c, app_globals as g
from mpulsweb.lib.translation import _
-from mpulsweb.lib.base import render
+from mpulsweb.lib.base import render, session
from mpulsweb.lib.helpers import url_for
from mpulsweb.model.appointment import CaseAppointmentFactory
Modified: base/trunk/mpulsweb/lib/helpers.py
===================================================================
--- base/trunk/mpulsweb/lib/helpers.py 2010-08-10 20:16:22 UTC (rev 3372)
+++ base/trunk/mpulsweb/lib/helpers.py 2010-08-11 09:54:34 UTC (rev 3373)
@@ -36,6 +36,7 @@
from string import printable
from xml.sax.saxutils import quoteattr
+# we still import session from pylons here because of circular imports
from pylons import c, cache, config, g, request, response, session, url
from mpulsweb.lib.translation import _
Modified: base/trunk/mpulsweb/lib/navigation.py
===================================================================
--- base/trunk/mpulsweb/lib/navigation.py 2010-08-10 20:16:22 UTC (rev 3372)
+++ base/trunk/mpulsweb/lib/navigation.py 2010-08-11 09:54:34 UTC (rev 3373)
@@ -31,7 +31,7 @@
import logging
from cgi import escape
-from pylons import session, g
+from pylons import g
from formed.meta.data import PageNode
from formed.instance.tree import InstanceNode, RepeatInstanceContainerNode, \
@@ -41,6 +41,7 @@
from mpulsweb.lib.translation import _
from mpulsweb.lib.db import PostgresDBInterface
import mpulsweb.lib.helpers
+from mpulsweb.lib.base import session
log = logging.getLogger(__name__)
Modified: base/trunk/mpulsweb/lib/security.py
===================================================================
--- base/trunk/mpulsweb/lib/security.py 2010-08-10 20:16:22 UTC (rev 3372)
+++ base/trunk/mpulsweb/lib/security.py 2010-08-11 09:54:34 UTC (rev 3373)
@@ -43,6 +43,7 @@
from decorator import decorator
from webob.exc import HTTPUnauthorized
+# we still import session from pylons here because of circular imports
from pylons import request, session, config, g
from mpulsweb.lib.db import DB, db, enter, leave
Modified: base/trunk/mpulsweb/lib/validators.py
===================================================================
--- base/trunk/mpulsweb/lib/validators.py 2010-08-10 20:16:22 UTC (rev 3372)
+++ base/trunk/mpulsweb/lib/validators.py 2010-08-11 09:54:34 UTC (rev 3373)
@@ -10,14 +10,14 @@
StringBoolean, DateConverter, TimeConverter, FormValidator, MaxLength, \
FileUploadKeeper, OneOf
-from pylons import session, app_globals as g
+from pylons import app_globals as g
from mpulsweb.lib.translation import _
from mpulsweb.lib.db import db
from mpulsweb.lib.helpers import format_date
+from mpulsweb.lib.base import session
-
log = logging.getLogger(__name__)
Modified: base/trunk/mpulsweb/model/user.py
===================================================================
--- base/trunk/mpulsweb/model/user.py 2010-08-10 20:16:22 UTC (rev 3372)
+++ base/trunk/mpulsweb/model/user.py 2010-08-11 09:54:34 UTC (rev 3373)
@@ -25,11 +25,10 @@
import datetime
import logging
-from pylons import session
-
import mpulsweb.lib.helpers as h
from mpulsweb.lib.security import getDbName
from mpulsweb.lib.db import db
+from mpulsweb.lib.base import session
log = logging.getLogger(__name__)
More information about the Mpuls-commits
mailing list