Update PostModifyForm to use permissions to create its fields

Fields are only displayed via the PostModifyForm if the user has
specific permissions to do things, like set stickies.

Also, add PostModifySuccessView that will close the modify window when
the process is complete.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2022-06-30 18:16:08 -07:00
parent 6f99472f16
commit 0ac383ce6c
7 changed files with 96 additions and 15 deletions

View File

@@ -22,6 +22,9 @@ urlpatterns = [
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"
),
]
# 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)