Move nav sections to respective apps

This commit is contained in:
Kumi 2021-10-24 17:45:23 +02:00
parent 0ed152e061
commit 2e03956f1d
2 changed files with 17 additions and 12 deletions

16
dreams/features.py Normal file
View file

@ -0,0 +1,16 @@
from frontend.classes import NavSection, NavItem
from django.urls import reverse_lazy
dreams_section = NavSection("Dreams")
dreams_items = {
"dreams_dream_list": NavItem("Dream List", reverse_lazy("dreams:dream_list")),
"dreams_theme_list": NavItem("Themes", reverse_lazy("dreams:theme_list")),
"dreams_notification_list": NavItem("Notifications", reverse_lazy("dreams:notification_list"))
}
for _, item in dreams_items.items():
dreams_section.add_item(item)
NAV_SECTIONS = [dreams_section]

View file

@ -15,15 +15,4 @@ mood_items = {
for _, item in mood_items.items(): for _, item in mood_items.items():
mood_section.add_item(item) mood_section.add_item(item)
dreams_section = NavSection("Dreams") NAV_SECTIONS = [mood_section]
dreams_items = {
"dreams_dream_list": NavItem("Dream List", reverse_lazy("dreams:dream_list")),
"dreams_theme_list": NavItem("Themes", reverse_lazy("dreams:theme_list")),
"dreams_notification_list": NavItem("Notifications", reverse_lazy("dreams:notification_list"))
}
for _, item in dreams_items.items():
dreams_section.add_item(item)
NAV_SECTIONS = [mood_section, dreams_section]