| 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 |