Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: sitescripts/formmail/README.md

Issue 29984580: Issue 4413 - Merge formmail.py and formmail2.py (Closed) Base URL: https://hg.adblockplus.org/sitescripts/
Patch Set: Start the README Created Jan. 18, 2019, 12:44 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « .sitescripts.example ('k') | sitescripts/formmail/template/eyeo.mail » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sitescripts/formmail/README.md
===================================================================
new file mode 100644
--- /dev/null
+++ b/sitescripts/formmail/README.md
@@ -0,0 +1,45 @@
+# formmail
+
+This script generates a form and sends an email.? It provides the following URLs:
Vasily Kuznetsov 2019/01/18 16:52:13 The script doesn't generate the form, it only acce
rhowell 2019/01/18 20:08:07 Done.
+
+* */?
+
+## Dependencies
+
+* [Python 2.7](https://www.python.org/download/releases/2.7/)
+* [mock](https://pypi.python.org/pypi/mock) (Only for the tests)
+* _Anthing else?_
Vasily Kuznetsov 2019/01/18 16:52:13 The handler also uses Jinja2 for rendering the tem
rhowell 2019/01/18 20:08:07 Done.
+
+## Running the script
+
+The script can be run as a module, using the following command:
Vasily Kuznetsov 2019/01/18 16:52:13 formmail.py is not really a standalong script, it'
rhowell 2019/01/18 20:08:07 Done.
+
+```commandline
+ sitescripts.formmail.web.formmail.sendMail
+```
+
+The script can also be run directly from the file, using:
+```commandline
+ python sitescripts/formmail/web/formmail.py
+```
+
+## Configuration
+
+The handler is configured via sitescripts config. In order to activate this
+handler, add the following line to multiplexer config:
+
+ [multiplexer]
Vasily Kuznetsov 2019/01/18 16:52:13 This part should probably be in # Running the web
rhowell 2019/01/18 20:08:07 Done.
+ sitescripts.formmail.web.formmail =
+
+Its own configuration is in the section `formmail`:
+
+ [formmail]
Vasily Kuznetsov 2019/01/18 16:52:13 This part will need more explanation. I think we s
rhowell 2019/01/18 20:08:07 I'm still not exactly clear what the `.fields` sec
Vasily Kuznetsov 2019/01/21 13:54:17 The form itself is usually another page, so its be
rhowell 2019/01/22 22:53:54 Ahh, gotcha. Makes sense. Thank you for the very c
+ test.csv_log = /var/log/something.csv_log
+ test.url=test/apply/submit
+ test.template=formmail/test/template/test.mail
+ test.fields.email=mandatory, email
+ test.fields.email.mandatory=You failed the email test
+ test.fields.email.email=You failed the email validation
+ test.fields.non_mandatory_email=email
+ test.fields.non_mandatory_message=
+ test.fields.mandatory=mandatory
« no previous file with comments | « .sitescripts.example ('k') | sitescripts/formmail/template/eyeo.mail » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld