Skip to content
Browse files

Default all inserted variables to None - this makes caching easier wi…

…thin templates as this tag does not tolerate non-existent variables.
  • Loading branch information...
1 parent 5304a98 commit cb282ff6cd35295ffe995b18ccab7bcf5cc5bbd4 @dokterbob dokterbob committed Apr 2, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 simplesite/context_processors.py
View
7 simplesite/context_processors.py
@@ -17,7 +17,12 @@ def menu(request):
menu_list = Menu.objects.filter()
- menu_dict = {'menu_list': menu_list.filter(visible=True) }
+ menu_dict = {'menu_list': menu_list.filter(visible=True),
+ 'menu_current': None,
+ 'submenu_current': None,
+ 'page_current': None,
+ 'submenu_list': None,
+ }
try:
view, args, kwargs = resolve(request.path, urlconf='simplesite.urls')

0 comments on commit cb282ff

Please sign in to comment.
Something went wrong with that request. Please try again.