Skip to content
Snippets Groups Projects
Commit 3ddf2458 authored by Nadja Geisler's avatar Nadja Geisler :sunny:
Browse files

redirect top level page to current event overview

parent ddc0ffe3
No related branches found
No related tags found
No related merge requests found
from django.urls import path
from AKDashboard import views
app_name = "dashboard"
urlpatterns = [
path('', views.TopLevelRedirectView.as_view(), name='top_level_redirect'),
]
# Create your views here.
from django.urls import reverse_lazy
from django.views.generic import RedirectView
from AKModel.models import Event
class TopLevelRedirectView(RedirectView):
is_permanent = False
url = reverse_lazy('submit:submission_overview',
kwargs={'event_slug': Event.objects.filter(active=True).last().slug})
......@@ -19,5 +19,6 @@ from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('AKSubmission.urls', namespace='submit')),
path('', include('AKDashboard.urls', namespace='dashboard')),
path('i18n/', include('django.conf.urls.i18n')),
]
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