added context processor for menu items
This commit is contained in:
parent
a383f3ed04
commit
e22c482d52
|
@ -12,16 +12,7 @@ def index(request):
|
|||
except:
|
||||
statuses = []
|
||||
boxes = SliderBox.objects.all()
|
||||
menuHeads = MenuHeading.objects.all()
|
||||
menus = []
|
||||
for m in menuHeads:
|
||||
d = {
|
||||
'name': m.name,
|
||||
'items': [{'name': item.name, 'url': item.url} for item in m.menuitem_set.all()]
|
||||
}
|
||||
menus.append(d)
|
||||
return render_to_response("noel/index.html", RequestContext(request, {
|
||||
'tweets': statuses[0:5],
|
||||
'boxes': boxes,
|
||||
'menus': menus
|
||||
'boxes': boxes
|
||||
}))
|
||||
|
|
|
@ -85,6 +85,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
|
|||
"django.core.context_processors.i18n",
|
||||
"django.core.context_processors.media",
|
||||
"multilingual.context_processors.multilingual",
|
||||
"frontpage.context_processors.menus"
|
||||
)
|
||||
|
||||
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
||||
|
|
Loading…
Reference in New Issue
Block a user