dnscms: improve associations app
This commit is contained in:
@@ -5,7 +5,6 @@ from django.utils.html import format_html
|
||||
from wagtail import hooks
|
||||
from wagtail.admin.menu import MenuItem
|
||||
|
||||
from associations.models import AssociationIndex
|
||||
from news.models import NewsIndex
|
||||
|
||||
|
||||
@@ -14,15 +13,6 @@ def enable_additional_rich_text_features(features):
|
||||
features.default_features.extend(["h5", "h6", "blockquote"])
|
||||
|
||||
|
||||
@hooks.register("register_admin_menu_item")
|
||||
def register_associations_menu_item():
|
||||
page = AssociationIndex.objects.first()
|
||||
associations_url = "#"
|
||||
if page:
|
||||
associations_url = reverse("wagtailadmin_explore", args=(quote(page.pk),))
|
||||
return MenuItem("Foreninger", associations_url, icon_name="group", order=2)
|
||||
|
||||
|
||||
@hooks.register("register_admin_menu_item")
|
||||
def register_news_menu_item():
|
||||
page = NewsIndex.objects.first()
|
||||
|
||||
Reference in New Issue
Block a user