-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
string composition from form fields #79
Conversation
@ramereth I did, I discussed it with @Kennric , and my understanding is that the list provided to |
How will the date field work since it's not a field in the form? |
@Kennric how will we determine the format of the date being printed in the string? For this specific use-case, we need a unix echo timestamp, but we may need others later. |
@Kennric @ramereth For now I check for 'date' and insert the timestamp if 'date' is there. I interpreted "unix timestamp" as the regular "seconds since 1970" unix standard, is this correct?
|
@leian7 yes, that is correct |
@Kennric can we please get this merged and deployed? |
For #77 . Needed for osuosl-pelican's osuosl/osuosl-pelican#159
Changes
fields_to_join
as described in string composition from form fields #77 when it is providedformat_message
that includes afields_to_join
in the dummy POST requestfields_to_join
field if it existsTo run tests
make tests
To "send" a test email (unable to send actual email locally because it would require running a local smtp server)
request_handler.py
, comment out lines 467-481 and uncommentprint(msg_send)
on 466 insteadfields_to_join
or use the premade example intemplates
: navigate totemplates/
and dopython -m SimpleHTTPServer [port num that isn't 5000]
. Make sure yourform action
is to localhost:5000. You can also try including a nonexistent field infields_to_join
to test validation (see below for sample output).make run
in another terminalfields_to_join
were concatenated correctly if you supplied valid fields. Sample terminal output forindex.html
is below.Expected output
Notes
request_handler.py
's existingformat_message
method, but I can make a new method forformat_message
to call if needed.