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:
2022-07-13 15:19:20 -07:00
parent 6ff64a3299
commit 83533b5fb4
9 changed files with 147 additions and 3 deletions

View File

@@ -155,6 +155,10 @@ class BanForm(ModelForm):
self.instance.expires = expires
class PostDeleteForm(forms.Form):
image_only = forms.CharField(widget=forms.HiddenInput(), initial="0")
class PostModifyForm(ModelForm):
"""
A form used to modify the attributes of a post (sticky, locked, sink, etc)