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-06-14 14:56:50 -07:00
|
|
|
from django.views.generic.base import TemplateView
|
2022-05-03 18:02:04 -07:00
|
|
|
from board.views import *
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app_name = "board"
|
|
|
|
|
urlpatterns = [
|
|
|
|
|
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-14 14:56:50 -07:00
|
|
|
path("<slug:url>/report/<int:id>/", ReportView.as_view(), name="report_form"),
|
|
|
|
|
path(
|
|
|
|
|
"report/success/",
|
|
|
|
|
TemplateView.as_view(template_name="board/report_success.html"),
|
|
|
|
|
name="report_success",
|
|
|
|
|
),
|
2022-06-20 15:26:35 -07:00
|
|
|
path(
|
|
|
|
|
"banned",
|
|
|
|
|
BannedView.as_view(),
|
|
|
|
|
name="banned",
|
|
|
|
|
),
|
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)
|