mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-06 09:57:57 +00:00
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:
@ -37,7 +37,8 @@ urlpatterns = [
|
||||
url(r'^services/(.*)/$', pgweb.profserv.views.profservform),
|
||||
|
||||
# Docs comments
|
||||
url(r'^comments/(new)/(.*)/(.*)/$', pgweb.docs.views.commentform),
|
||||
url(r'^comments/(new)/([^/]+)/([^/]+)/$', pgweb.docs.views.commentform),
|
||||
url(r'^comments/(new)/([^/]+)/([^/]+)/done/$', pgweb.docs.views.commentform_done),
|
||||
|
||||
# Log in, logout, change password etc
|
||||
url(r'^login/$', pgweb.account.views.login),
|
||||
|
@ -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', {})
|
||||
|
Reference in New Issue
Block a user