Files
fet2020/fet2020/intern/urls.py
2023-11-13 08:52:18 +00:00

67 lines
1.4 KiB
Python

from django.urls import include, path
from . import apps, views
from .views import (
AttachmentCreateView,
AttachmentDetailView,
AttachmentUpdateView,
EtherpadCreateView,
FileUploadCreateView,
TopicCreateView,
TopicDetailView,
TopicUpdateView,
)
app_name = apps.InternConfig.name
attachment_urlpatterns = [
path(
"",
AttachmentDetailView.as_view(),
name="attachment",
),
path(
"update/",
AttachmentUpdateView.as_view(),
name="attachment_update",
),
path(
"create-etherpad/",
EtherpadCreateView.as_view(),
name="etherpad_create",
),
path(
"create-file/",
FileUploadCreateView.as_view(),
name="file_create",
),
]
topic_urlpatterns = [
path("", TopicDetailView.as_view(), name="topic"),
path(
"update/",
TopicUpdateView.as_view(),
name="topic_update",
),
path(
"create-attachment/",
AttachmentCreateView.as_view(),
name="attachment_create",
),
]
urlpatterns = [
path("", views.index, name="index"),
path(
"<slug:topic_group_slug>/create-topic/",
TopicCreateView.as_view(),
name="topic_create",
),
path("<slug:topic_group_slug>/<slug:slug>/", include(topic_urlpatterns)),
path(
"<slug:topic_group_slug>/<slug:topic_slug>/<slug:slug>/",
include(attachment_urlpatterns),
),
]