diff options
author | Magnus Hagander | 2020-09-10 12:52:41 +0000 |
---|---|---|
committer | Magnus Hagander | 2020-09-10 12:52:41 +0000 |
commit | 5ffe6c389c020c718065b5d2146ce25ebe4b0c9b (patch) | |
tree | db5699adf9daa7a65c1cfa0cb9e6dd87d1af4021 /pgweb/profserv/views.py | |
parent | b3e9a962e4514962a1fdbf86b8cdbae3103e76e9 (diff) |
Re-work moderation of submitted items
This includes a number of new features:
* Move some moderation functionality into shared places, so we don't
keep re-inventing the wheel.
* Implement three-state moderation, where the submitter can edit their
item and then explicitly say "i'm done, please moderate this now".
This is currently only implemented for News, but done in a reusable
way.
* Move moderation workflow to it's own set of URLs instead of
overloading it on the general admin interface. Admin interface remains
for editing things, but these are now separated out into separate
things.
* Do proper stylesheet clearing for moderation of markdown fields, using
a dynamic sandboxed iframe, so it's not ruined by the /admin/ css.
* Move moderation email notification into dedicated moderation code,
thereby simplifying the admin subclassing we did which was in some
places quite fragile.
* Reset date of news postings to the date of their approval, when
approved. This avoids some annoying ordering issues.
Diffstat (limited to 'pgweb/profserv/views.py')
-rw-r--r-- | pgweb/profserv/views.py | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/pgweb/profserv/views.py b/pgweb/profserv/views.py index ff768485..509bccc0 100644 --- a/pgweb/profserv/views.py +++ b/pgweb/profserv/views.py @@ -1,11 +1,8 @@ from django.http import Http404 -from pgweb.util.decorators import login_required from pgweb.util.contexts import render_pgweb -from pgweb.util.helpers import simple_form from .models import ProfessionalService -from .forms import ProfessionalServiceForm regions = ( ('africa', 'Africa'), @@ -52,10 +49,3 @@ def region(request, servtype, regionname): 'regionname': regname, 'services': services, }) - - -# Forms to edit -@login_required -def profservform(request, itemid): - return simple_form(ProfessionalService, itemid, request, ProfessionalServiceForm, - redirect='/account/edit/services/') |