X-Git-Url: https://git.0d.be/?p=panikweb.git;a=blobdiff_plain;f=panikweb%2Fpaniktags%2Ftemplatetags%2Fpaniktags.py;h=a8f9e7d540a018faa24de9526df7cf96544bef45;hp=b6d468dd9398bbf054d7de774ee50d79e40032c9;hb=707412b82f24775a25233d8c8274f6c3a7590af0;hpb=957481d88a0edc25a22ecc6101e6c2724cc249e6 diff --git a/panikweb/paniktags/templatetags/paniktags.py b/panikweb/paniktags/templatetags/paniktags.py index b6d468d..a8f9e7d 100644 --- a/panikweb/paniktags/templatetags/paniktags.py +++ b/panikweb/paniktags/templatetags/paniktags.py @@ -131,7 +131,11 @@ def player(context): @register.inclusion_tag('includes/metaNav.html', takes_context=True) def metanav(context, active=None): - request_path = context['request'].path + try: + request_path = context['request'].path + except KeyError: + # a context without 'requests' may happen when rendering error pages + request_path = 'xxx' section = 'About' if request_path == '/': section = 'Home'