Skip to content
Snippets Groups Projects
Commit 023a5b86 authored by Todd Dembrey's avatar Todd Dembrey
Browse files

Make sure we can link after the urlconf changes

parent 596a5022
No related branches found
No related tags found
No related merge requests found
from urllib.parse import urljoin
from django.urls import reverse
from wagtail.core import hooks
from wagtail.admin.menu import MenuItem
from opentech.apply.home.models import ApplyHomePage
@hooks.register('register_admin_menu_item')
def register_dashboard_menu_item():
apply_home = ApplyHomePage.objects.first()
return MenuItem(
'Apply Dashboard',
reverse('dashboard:dashboard'),
urljoin(apply_home.url, reverse('dashboard:dashboard', 'opentech.apply.urls')),
classnames='icon icon-arrow-left',
order=100000,
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment