summaryrefslogtreecommitdiff
path: root/sandbox/py-rest-doc/sphinx/web/application.py
diff options
context:
space:
mode:
authorgbrandl <gbrandl@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2007-07-06 14:03:24 +0000
committergbrandl <gbrandl@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2007-07-06 14:03:24 +0000
commitef8d4115a98e15bccba0644d08a03412bfd98ff9 (patch)
tree9bf4977d2349a73162017d508ef93b8d4ad6ed0b /sandbox/py-rest-doc/sphinx/web/application.py
parent65d3934df849394fb8333cfe2d62de4a5692e185 (diff)
downloaddocutils-ef8d4115a98e15bccba0644d08a03412bfd98ff9.tar.gz
Improved comments and preview form.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@5319 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'sandbox/py-rest-doc/sphinx/web/application.py')
-rw-r--r--sandbox/py-rest-doc/sphinx/web/application.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/sandbox/py-rest-doc/sphinx/web/application.py b/sandbox/py-rest-doc/sphinx/web/application.py
index 9a96202bf..a01282e31 100644
--- a/sandbox/py-rest-doc/sphinx/web/application.py
+++ b/sandbox/py-rest-doc/sphinx/web/application.py
@@ -143,8 +143,9 @@ class DocumentationApplication(object):
page_id, orig_contents = self.get_page_source(page)
author = req.form.get('name')
email = req.form.get('email')
+ summary = req.form.get('summary')
contents = req.form.get('contents')
- fields = (author, email, contents)
+ fields = (author, email, summary, contents)
form_error = None
rendered = None
@@ -152,7 +153,7 @@ class DocumentationApplication(object):
if not all(fields):
form_error = 'You have to fill out all fields.'
elif not _mail_re.search(email):
- form_error = 'You have to provide a valid mail address.'
+ form_error = 'You have to provide a valid e-mail address.'
elif req.form.get('homepage') or self.antispam.is_spam(fields):
form_error = 'Your text contains blocked URLs or words.'
else:
@@ -173,6 +174,7 @@ class DocumentationApplication(object):
contents=contents,
author=author,
email=email,
+ summary=summary,
pagename=page,
form_error=form_error,
rendered=rendered,
@@ -269,9 +271,10 @@ class DocumentationApplication(object):
if not all(fields):
form_error = 'You have to fill out all fields.'
elif _mail_re.search(author_mail) is None:
- form_error = 'You have to provide a valid mail address.'
+ form_error = 'You have to provide a valid e-mail address.'
elif len(comment_body) < 20:
- form_error = 'You comment is too short.'
+ form_error = 'You comment is too short ' \
+ '(must have at least 20 characters).'
else:
self.cache.pop(rstfilename, None)
comment = Comment(rstfilename, title, author, author_mail,