safety first
This commit is contained in:
Родитель
7cd54189fc
Коммит
d2000bc11a
|
@ -228,7 +228,7 @@ def login_link(context):
|
||||||
@register.function
|
@register.function
|
||||||
@jinja2.contextfunction
|
@jinja2.contextfunction
|
||||||
def page_title(context, title):
|
def page_title(context, title):
|
||||||
if context['WEBAPPS']:
|
if context.get('WEBAPPS'):
|
||||||
return u'%s :: %s' % (smart_unicode(title), _('Web Appstore'))
|
return u'%s :: %s' % (smart_unicode(title), _('Web Appstore'))
|
||||||
else:
|
else:
|
||||||
app = context['request'].APP
|
app = context['request'].APP
|
||||||
|
@ -268,7 +268,7 @@ def impala_breadcrumbs(context, items=list(), add_default=True, crumb_size=40):
|
||||||
show a list of breadcrumbs. If url is None, it won't be a link.
|
show a list of breadcrumbs. If url is None, it won't be a link.
|
||||||
Accepts: [(url, label)]
|
Accepts: [(url, label)]
|
||||||
"""
|
"""
|
||||||
if add_default and not context['WEBAPPS']:
|
if add_default and not context.get('WEBAPPS'):
|
||||||
app = context['request'].APP
|
app = context['request'].APP
|
||||||
crumbs = [(urlresolvers.reverse('i_home'), page_name(app))]
|
crumbs = [(urlresolvers.reverse('i_home'), page_name(app))]
|
||||||
else:
|
else:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче