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

Side by Side 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.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « .sitescripts.example ('k') | sitescripts/formmail/template/eyeo.mail » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # formmail
2
3 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.
4
5 * */?
6
7 ## Dependencies
8
9 * [Python 2.7](https://www.python.org/download/releases/2.7/)
10 * [mock](https://pypi.python.org/pypi/mock) (Only for the tests)
11 * _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.
12
13 ## Running the script
14
15 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.
16
17 ```commandline
18 sitescripts.formmail.web.formmail.sendMail
19 ```
20
21 The script can also be run directly from the file, using:
22 ```commandline
23 python sitescripts/formmail/web/formmail.py
24 ```
25
26 ## Configuration
27
28 The handler is configured via sitescripts config. In order to activate this
29 handler, add the following line to multiplexer config:
30
31 [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.
32 sitescripts.formmail.web.formmail =
33
34 Its own configuration is in the section `formmail`:
35
36 [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
37 test.csv_log = /var/log/something.csv_log
38 test.url=test/apply/submit
39 test.template=formmail/test/template/test.mail
40 test.fields.email=mandatory, email
41 test.fields.email.mandatory=You failed the email test
42 test.fields.email.email=You failed the email validation
43 test.fields.non_mandatory_email=email
44 test.fields.non_mandatory_message=
45 test.fields.mandatory=mandatory
OLDNEW
« 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