2022-05-03 18:02:04 -07:00
|
|
|
from django.urls import path
|
2022-05-04 19:45:36 -07:00
|
|
|
from django.conf import settings
|
|
|
|
|
from django.conf.urls.static import static
|
2022-05-03 18:02:04 -07:00
|
|
|
from board.views import *
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app_name = "board"
|
|
|
|
|
urlpatterns = [
|
2022-06-24 16:21:41 -07:00
|
|
|
# Board views
|
2022-05-03 18:02:04 -07:00
|
|
|
path("<slug:url>/", BoardView.as_view(), name="board_detail"),
|
|
|
|
|
path("<slug:url>/page/<int:page>/", BoardView.as_view(), name="board_detail"),
|
|
|
|
|
path("<slug:url>/post/<int:id>/", PostView.as_view(), name="post_detail"),
|
2022-06-28 23:55:44 -07:00
|
|
|
path("<slug:url>/post/create/", PostCreateView.as_view(), name="post_create"),
|
2022-06-25 20:42:10 -07:00
|
|
|
path("<slug:url>/reply/<int:id>/", ReplyCreateView.as_view(), name="reply_create"),
|
|
|
|
|
path("post/success/", PostSuccessView.as_view(), name="post_success"),
|
2022-06-24 16:21:41 -07:00
|
|
|
# Reports
|
2022-06-23 16:03:09 -07:00
|
|
|
path("report/<slug:url>/<int:id>/", ReportView.as_view(), name="report_form"),
|
2022-06-24 16:21:41 -07:00
|
|
|
path("report/success/", ReportSuccessView.as_view(), name="report_success"),
|
|
|
|
|
# Bans
|
2022-06-23 16:03:09 -07:00
|
|
|
path("ban/<slug:url>/<int:id>/", BanCreateView.as_view(), name="ban_create"),
|
2022-06-24 16:21:41 -07:00
|
|
|
path("ban/success/", BanSuccessView.as_view(), name="ban_success"),
|
2022-07-13 15:19:20 -07:00
|
|
|
path("banned/", BannedView.as_view(), name="banned"),
|
2022-06-30 16:21:36 -07:00
|
|
|
# Other moderation pages
|
|
|
|
|
path("modify/<int:pk>/", PostModifyView.as_view(), name="post_modify"),
|
2022-06-30 18:16:08 -07:00
|
|
|
path(
|
|
|
|
|
"modify/success/", PostModifySuccessView.as_view(), name="post_modify_success"
|
|
|
|
|
),
|
2022-07-13 15:19:20 -07:00
|
|
|
path("post/delete/<int:pk>/", PostDeleteView.as_view(), name="post_delete"),
|
|
|
|
|
path(
|
|
|
|
|
"post/delete/success/",
|
|
|
|
|
PostDeleteSuccessView.as_view(),
|
|
|
|
|
name="post_delete_success",
|
|
|
|
|
),
|
2022-05-03 18:02:04 -07:00
|
|
|
]
|
2022-05-04 19:45:36 -07:00
|
|
|
# TODO - make this conditional so we can serve images up with whatever server we want
|
|
|
|
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|