google-code-export / django-page-cms

Automatically exported from code.google.com/p/django-page-cms
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

missing context keys using load_pages and another tag ouside pages urls #142

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. use {% load_pages %} and another tag ({% pages_menu %} in the example)
in projects base template 

What is the expected output? What do you see instead?
Caught an exception while rendering: 'lang'
File /pages/templatetags/pages_tags.py, line 59, in pages_menu
    lang = context['lang']
KeyError: 'lang'

Please provide any additional information below.
'lang' and 'path' context keys should be defined LoadPagesNode.render

        if (not context.has_key('lang')):
            lang=get_language_from_request(request)
            context['lang']=lang
        if (not context.has_key('path')):
            path=request.path
            context['path']=path

Original issue reported on code.google.com by bruno.fe...@gmail.com on 10 Aug 2009 at 7:24

GoogleCodeExporter commented 9 years ago
Is it fixed now with last revision?

Original comment by batiste....@gmail.com on 14 Aug 2009 at 2:31

GoogleCodeExporter commented 9 years ago
yes

Original comment by bruno.fe...@gmail.com on 14 Aug 2009 at 9:35

GoogleCodeExporter commented 9 years ago

Original comment by batiste....@gmail.com on 14 Aug 2009 at 10:03