blob: e16603942d70848362484aa51531eb02c9caa838 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# Django Imports
from django.shortcuts import redirect
from django.urls import reverse
from django.conf import settings
# Local Imports
from cms.models import Page
def index(request):
page = Page.objects.filter(title=settings.HOME_PAGE_TITLE)
if page.exists():
redirect_url = reverse("cms:home", args=[page.first().permalink])
else:
redirect_url = reverse("workshop_app:index")
return redirect(redirect_url)
|