redirect from start page to writing/

This commit is contained in:
Gesche 2021-05-11 22:52:00 +02:00
parent 219f6759be
commit 39a877ad10
2 changed files with 8 additions and 0 deletions

View File

@ -16,8 +16,11 @@ Including another URLconf
from django.contrib import admin
from django.urls import path, include
from stories.views import IndexRedirectView
urlpatterns = [
path('writing/', include('writingtogether.urls')),
path('accounts/', include('django.contrib.auth.urls')),
path('admin/', admin.site.urls),
path('', IndexRedirectView.as_view(), name='main_index')
]

5
stories/views.py Normal file
View File

@ -0,0 +1,5 @@
from django.views.generic import RedirectView
class IndexRedirectView(RedirectView):
pattern_name = 'writing:index'