From e1cda9861d14ca61bda0f5d6de7309a10078ef6f Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Sat, 6 Jan 2018 17:49:30 +0100 Subject: [PATCH] Fix doc comments for devel version Don't say version 0.0 in the emails that are sent out. That's what we call it internally, but the URL should have /devel/ in it. Fix this both in the template, and then if it comes through in the form again in case the user picked up a link elsewhere that is incorrect. --- pgweb/docs/views.py | 3 +++ templates/docs/docspage.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pgweb/docs/views.py b/pgweb/docs/views.py index 6aba57ca..e9fc639a 100644 --- a/pgweb/docs/views.py +++ b/pgweb/docs/views.py @@ -132,6 +132,9 @@ def commentform(request, itemid, version, filename): if request.method == 'POST': form = DocCommentForm(request.POST) if form.is_valid(): + if version == '0.0': + version = 'devel' + send_template_mail( settings.DOCSREPORT_NOREPLY_EMAIL, settings.DOCSREPORT_EMAIL, diff --git a/templates/docs/docspage.html b/templates/docs/docspage.html index 32effd2b..ca2bd174 100644 --- a/templates/docs/docspage.html +++ b/templates/docs/docspage.html @@ -95,7 +95,7 @@ This page in other versions: If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use -this form +this form to report a documentation issue.

-- 2.11.4.GIT