Make docs comment suggestions do a redirect

This is the same as b2ed494655 did for bug
reports.

This changes the regexps for all the doc comment suggestions forms to be
a little bit more specific than before.
This commit is contained in:
Magnus Hagander
2019-01-28 14:06:29 +01:00
parent e767582d11
commit bbdcb1700d
2 changed files with 8 additions and 2 deletions

View File

@ -171,7 +171,7 @@ def commentform(request, itemid, version, filename):
replyto='%s, %s' % (form.cleaned_data['email'], settings.DOCSREPORT_EMAIL),
sendername='PG Doc comments form'
)
return render_pgweb(request, 'docs', 'docs/docsbug_completed.html', {})
return HttpResponseRedirect("done/")
else:
form = DocCommentForm(initial={
'name': '%s %s' % (request.user.first_name, request.user.last_name),
@ -187,3 +187,8 @@ def commentform(request, itemid, version, filename):
}),
'savebutton': 'Send Email',
})
@login_required
def commentform_done(request, itemid, version, filename):
return render_pgweb(request, 'docs', 'docs/docsbug_completed.html', {})