Files
fet2020/fet2020/posts/urls.py
2022-10-04 16:16:25 +00:00

29 lines
867 B
Python

from django.urls import path, re_path
from . import apps
from . import views
from .utils import slug_calc, tag_complete
app_name = apps.PostsConfig.name
urlpatterns = [
path("", views.index, name="index"),
# fet calendar (path have to be ahead show)
path("fet_calendar.ics", views.calendar, name="calendar"),
path("<slug:slug>", views.PostDetailView.as_view(), name="show"),
path("<slug:slug>/update", views.PostUpdateView.as_view(), name="post-update"),
re_path(
r"^(?P<id>[-\w]+)/agenda.pdf$",
views.show_pdf_agenda,
name="show_pdf_agenda",
),
re_path(
r"^(?P<id>[-\w]+)/protokoll.pdf$",
views.show_pdf_protocol,
name="show_pdf_protocol",
),
path("t/<str:tag>", views.tags, name="tags"),
path("func/tag_complete", tag_complete),
path("func/slug_calc", slug_calc),
]