symposion_app/symposion_project/apps/cms/context_processors.py
2012-02-05 20:34:49 -05:00

10 lines
240 B
Python

from cms.models import MenuItem
def menuitems(request):
qs = MenuItem.objects.filter(published=True)
if not request.user.is_authenticated():
qs = qs.filter(login_required=False)
return {
"menuitems": qs,
}