X-Git-Url: https://git.mdrn.pl/prawokultury.git/blobdiff_plain/c95c80ba092947ae3f7cfcc5eb02976d18d00247..ac3415aaa16a18aef76c83e007b20eeedff55cdb:/prawokultury/menu_items.py diff --git a/prawokultury/menu_items.py b/prawokultury/menu_items.py index 1da9c69..2174ca0 100644 --- a/prawokultury/menu_items.py +++ b/prawokultury/menu_items.py @@ -1,30 +1,24 @@ # -*- coding: utf-8 -from migdal.models import Category, Entry from menu.helpers import ObjectMenuItem, MenuItem, ModelMenuItem from django.core.urlresolvers import reverse_lazy from django.utils.translation import ugettext_lazy as _ -ITEMS = [] - -ITEMS.append(ObjectMenuItem( - obj_get=lambda:Entry.published_objects.get(slug_pl='o-nas') -)) - -ITEMS.append(ModelMenuItem(Entry, reverse_lazy('migdal_entry_list_publications'), - field_lookups={'type': 'publications'}, title=_('Publications'))) - -ITEMS.append(MenuItem(reverse_lazy('events'), _('Events'))) - -ITEMS.append(ObjectMenuItem( - obj_get=lambda:Category.objects.get(slug_pl='stanowisko'), - rev_lookups={Entry: 'categories'}, - title=_('Positions') -)) - -ITEMS.append(MenuItem(reverse_lazy('questions'), _('First aid'))) - -ITEMS.append(ObjectMenuItem( - obj_get=lambda:Entry.published_objects.get(slug_pl='pierwsza-pomoc'), - title=_('Guide') -)) +def ITEMS(): + from migdal.models import Category, Entry + return [ + ObjectMenuItem(obj_get=lambda: Entry.published_objects.get(slug_pl='o-nas')), + ModelMenuItem(Entry, reverse_lazy('migdal_entry_list_publications'), + field_lookups={'type': 'publications'}, title=_('Publications')), + MenuItem(reverse_lazy('events'), _('Events'), langs=['en']), + MenuItem('/kurs/', u'Kurs dla uczelni', langs=['pl']), + ObjectMenuItem( + obj_get=lambda: Category.objects.get(slug_pl='stanowisko'), + rev_lookups={Entry: 'categories'}, + title=_('Positions')), + MenuItem( + reverse_lazy('questions'), _('First aid')), + ObjectMenuItem( + obj_get=lambda: Entry.published_objects.get(slug_pl='pierwsza-pomoc'), + title=_('Guide')), +]