[Mpuls-commits] r5694 - in base/trunk/mpulsweb: controllers lib model
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Dec 6 12:00:54 CET 2011
Author: ludwig
Date: 2011-12-06 12:00:50 +0100 (Tue, 06 Dec 2011)
New Revision: 5694
Modified:
base/trunk/mpulsweb/controllers/annotations.py
base/trunk/mpulsweb/controllers/evaluate.py
base/trunk/mpulsweb/controllers/formularpage.py
base/trunk/mpulsweb/controllers/phase.py
base/trunk/mpulsweb/controllers/repeatgroup.py
base/trunk/mpulsweb/lib/base.py
base/trunk/mpulsweb/lib/helpers.py
base/trunk/mpulsweb/lib/navigation.py
base/trunk/mpulsweb/lib/security.py
base/trunk/mpulsweb/model/phase.py
Log:
Issue 2738: Upgrade Squeeze: Instead of pylons g and c import app_globals
and tmpl_context. g and c are deprecated in newer pylons versions.
Modified: base/trunk/mpulsweb/controllers/annotations.py
===================================================================
--- base/trunk/mpulsweb/controllers/annotations.py 2011-12-05 14:41:50 UTC (rev 5693)
+++ base/trunk/mpulsweb/controllers/annotations.py 2011-12-06 11:00:50 UTC (rev 5694)
@@ -1,8 +1,8 @@
import logging
-from pylons import g
+from pylons import app_globals as g
from mpulsweb.lib.translation import _
-from pylons import c
+from pylons import tmpl_context as c
from pylons.controllers.util import abort
from mpulsweb.lib.security import checkRole
Modified: base/trunk/mpulsweb/controllers/evaluate.py
===================================================================
--- base/trunk/mpulsweb/controllers/evaluate.py 2011-12-05 14:41:50 UTC (rev 5693)
+++ base/trunk/mpulsweb/controllers/evaluate.py 2011-12-06 11:00:50 UTC (rev 5694)
@@ -4,7 +4,7 @@
import formencode
import pylons
-from pylons import g, c
+from pylons import app_globals as g, tmpl_context as c
from libmpuls.evaluation.config import EvaluationConfig
from libmpuls.evaluation.evaluation import EvaluationSet
Modified: base/trunk/mpulsweb/controllers/formularpage.py
===================================================================
--- base/trunk/mpulsweb/controllers/formularpage.py 2011-12-05 14:41:50 UTC (rev 5693)
+++ base/trunk/mpulsweb/controllers/formularpage.py 2011-12-06 11:00:50 UTC (rev 5694)
@@ -2,7 +2,7 @@
import logging
-from pylons import request, c, g
+from pylons import request, tmpl_context as c, app_globals as g
from pylons.controllers.util import abort, redirect_to
from pylons.i18n.translation import get_lang
Modified: base/trunk/mpulsweb/controllers/phase.py
===================================================================
--- base/trunk/mpulsweb/controllers/phase.py 2011-12-05 14:41:50 UTC (rev 5693)
+++ base/trunk/mpulsweb/controllers/phase.py 2011-12-06 11:00:50 UTC (rev 5694)
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import logging
-from pylons import c, g
+from pylons import tmpl_context as c, app_globals as g
from mpulsweb.lib.translation import _
from mpulsweb.lib.base import BaseController, h, render, request
Modified: base/trunk/mpulsweb/controllers/repeatgroup.py
===================================================================
--- base/trunk/mpulsweb/controllers/repeatgroup.py 2011-12-05 14:41:50 UTC (rev 5693)
+++ base/trunk/mpulsweb/controllers/repeatgroup.py 2011-12-06 11:00:50 UTC (rev 5694)
@@ -2,7 +2,7 @@
import logging
-from pylons import c
+from pylons import tmpl_context as c
from mpulsweb.lib.translation import _
from pylons.controllers.util import abort
Modified: base/trunk/mpulsweb/lib/base.py
===================================================================
--- base/trunk/mpulsweb/lib/base.py 2011-12-05 14:41:50 UTC (rev 5693)
+++ base/trunk/mpulsweb/lib/base.py 2011-12-06 11:00:50 UTC (rev 5694)
@@ -37,7 +37,8 @@
from routes import url_for
-from pylons import c, config, g, request, response
+from pylons import tmpl_context as c, config, app_globals as g, \
+ request, response
from pylons.controllers import WSGIController
from pylons.controllers.util import redirect_to, redirect
#from mpulsweb.lib.translation import _
Modified: base/trunk/mpulsweb/lib/helpers.py
===================================================================
--- base/trunk/mpulsweb/lib/helpers.py 2011-12-05 14:41:50 UTC (rev 5693)
+++ base/trunk/mpulsweb/lib/helpers.py 2011-12-06 11:00:50 UTC (rev 5694)
@@ -36,7 +36,7 @@
import datetime
from libmpuls.service.tags import TagSetterConfig, TagSetter
-from pylons import config, g, request, url
+from pylons import config, app_globals as g, request, url
from mpulsweb.lib.translation import _
# Use url_for from prior versions
Modified: base/trunk/mpulsweb/lib/navigation.py
===================================================================
--- base/trunk/mpulsweb/lib/navigation.py 2011-12-05 14:41:50 UTC (rev 5693)
+++ base/trunk/mpulsweb/lib/navigation.py 2011-12-06 11:00:50 UTC (rev 5694)
@@ -31,7 +31,7 @@
import logging
from cgi import escape
-from pylons import g
+from pylons import app_globals as g
from formed.meta.data import PageNode, Leaf, RadioNode, Node
from formed.instance.tree import InstanceNode, RepeatInstanceContainerNode, \
Modified: base/trunk/mpulsweb/lib/security.py
===================================================================
--- base/trunk/mpulsweb/lib/security.py 2011-12-05 14:41:50 UTC (rev 5693)
+++ base/trunk/mpulsweb/lib/security.py 2011-12-06 11:00:50 UTC (rev 5694)
@@ -44,7 +44,7 @@
from webob.exc import HTTPUnauthorized, HTTPForbidden, HTTPNotFound
-from pylons import request, config, g
+from pylons import request, config, app_globals as g
from mpulsweb.lib.db import DB, db, enter, leave
from mpulsweb.lib.translation import _
Modified: base/trunk/mpulsweb/model/phase.py
===================================================================
--- base/trunk/mpulsweb/model/phase.py 2011-12-05 14:41:50 UTC (rev 5693)
+++ base/trunk/mpulsweb/model/phase.py 2011-12-06 11:00:50 UTC (rev 5694)
@@ -3,7 +3,7 @@
import logging
import re
-from pylons import g, c
+from pylons import app_globals as g, tmpl_context as c
from mpulsweb.lib.translation import _
from formed.instance.backends.postgres import DBFactory as InstanceFactory
More information about the Mpuls-commits
mailing list