add a get_web_root_url method, overriden in larpe
This commit is contained in:
parent
62e5ed05f8
commit
22f88d49b3
|
@ -60,6 +60,9 @@ class QommonPublisher(Publisher):
|
|||
def get_root_url(self):
|
||||
return self.get_request().environ['SCRIPT_NAME'] + '/'
|
||||
|
||||
def get_web_root_url(self):
|
||||
return self.get_request().environ['SCRIPT_NAME'] + '/'
|
||||
|
||||
def format_publish_error(self, exc):
|
||||
get_response().filter = {}
|
||||
if isinstance(exc, errors.AccessError) and hasattr(exc, 'render'):
|
||||
|
|
|
@ -221,7 +221,6 @@ def get_default_ezt_template():
|
|||
|
||||
def decorate(body, response):
|
||||
from publisher import get_cfg
|
||||
root_url = get_publisher().get_root_url()
|
||||
|
||||
body = str(body)
|
||||
|
||||
|
@ -270,6 +269,8 @@ def decorate(body, response):
|
|||
except KeyError:
|
||||
pass
|
||||
|
||||
root_url = get_publisher().get_web_root_url()
|
||||
|
||||
if response.filter.get('admin_ezt'):
|
||||
header_menu = kwargs.get('header_menu')
|
||||
user_info = kwargs.get('user_info')
|
||||
|
|
Loading…
Reference in New Issue