##// END OF EJS Templates
core: make pylons global be used in obsolete parts of the code....
marcink -
r1895:002c3bcf default
parent child Browse files
Show More
@@ -20,7 +20,7 b''
20
20
21 import time
21 import time
22 import logging
22 import logging
23 from pylons import tmpl_context as c
23
24 from pyramid.httpexceptions import HTTPFound
24 from pyramid.httpexceptions import HTTPFound
25
25
26 from rhodecode.lib import helpers as h
26 from rhodecode.lib import helpers as h
@@ -120,6 +120,7 b' class BaseAppView(object):'
120 Registers attributes to pylons global `c`
120 Registers attributes to pylons global `c`
121 """
121 """
122 # TODO(marcink): remove once pyramid migration is finished
122 # TODO(marcink): remove once pyramid migration is finished
123 from pylons import tmpl_context as c
123 for k, v in tmpl_args.items():
124 for k, v in tmpl_args.items():
124 setattr(c, k, v)
125 setattr(c, k, v)
125
126
@@ -22,7 +22,6 b''
22 import logging
22 import logging
23 import collections
23 import collections
24
24
25 from pylons import url
26 from zope.interface import implementer
25 from zope.interface import implementer
27
26
28 from rhodecode.apps.admin.interfaces import IAdminNavigationRegistry
27 from rhodecode.apps.admin.interfaces import IAdminNavigationRegistry
@@ -64,6 +63,7 b' class NavEntry(object):'
64 pyramid_request = get_current_request()
63 pyramid_request = get_current_request()
65 return pyramid_request.route_path(self.view_name)
64 return pyramid_request.route_path(self.view_name)
66 else:
65 else:
66 from pylons import url
67 return url(self.view_name)
67 return url(self.view_name)
68
68
69 def get_localized_name(self, request):
69 def get_localized_name(self, request):
General Comments 0
You need to be logged in to leave comments. Login now