Add post and image deletion
This one was kind of a doozy. This also adds a custom 403 error page and fixes some permission denied behavior that I was having issues with for a while. This is also set up in a way that hopefully will allow me to easily implement user post deletion. Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -19,12 +19,18 @@ urlpatterns = [
|
||||
# Bans
|
||||
path("ban/<slug:url>/<int:id>/", BanCreateView.as_view(), name="ban_create"),
|
||||
path("ban/success/", BanSuccessView.as_view(), name="ban_success"),
|
||||
path("banned", BannedView.as_view(), name="banned"),
|
||||
path("banned/", BannedView.as_view(), name="banned"),
|
||||
# Other moderation pages
|
||||
path("modify/<int:pk>/", PostModifyView.as_view(), name="post_modify"),
|
||||
path(
|
||||
"modify/success/", PostModifySuccessView.as_view(), name="post_modify_success"
|
||||
),
|
||||
path("post/delete/<int:pk>/", PostDeleteView.as_view(), name="post_delete"),
|
||||
path(
|
||||
"post/delete/success/",
|
||||
PostDeleteSuccessView.as_view(),
|
||||
name="post_delete_success",
|
||||
),
|
||||
]
|
||||
# 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)
|
||||
|
||||
Reference in New Issue
Block a user