Fixed month page. Button transitions

This commit is contained in:
2022-11-10 17:41:54 +03:00
parent eb327f8c62
commit dc3b7b109a
3 changed files with 17 additions and 0 deletions
+1
View File
@@ -5,6 +5,7 @@ from . import views
urlpatterns = [
path('', views.index, name='index'),
path('<int:year>/', views.year_page, name='index'),
path('<int:year>/<int:month>/', views.month_page, name='index'),
path('<int:year>/<int:month>/<int:day>/', views.day_page, name='index'),
]
+4
View File
@@ -81,6 +81,10 @@ def day_page(request, year: int, month: int, day: int):
return render(request, 'faerun_calendar/index.html', params)
def month_page(request, year: int, month: int):
return HttpResponseRedirect(f'../../{year}')
def year_page(request, year: int):
params = None