Add post modify view
This allows moderators to modify posts (add sticky, etc). Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -115,3 +115,17 @@ class BanForm(ModelForm):
|
||||
else:
|
||||
expires = None
|
||||
self.instance.expires = expires
|
||||
|
||||
|
||||
class PostModifyForm(ModelForm):
|
||||
"""
|
||||
A form used to modify the attributes of a post (sticky, locked, sink, etc)
|
||||
"""
|
||||
|
||||
class Meta:
|
||||
model = Post
|
||||
fields = ["bump", "sticky"]
|
||||
|
||||
def clean(self):
|
||||
super(PostModifyForm, self).clean()
|
||||
print(self.fields["sticky"])
|
||||
|
||||
Reference in New Issue
Block a user