-
Notifications
You must be signed in to change notification settings - Fork 41
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
[WIP] Send messages via writeinpublic #2329
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysociety-pusher
force-pushed
the
send-messages-via-writeinpublic
branch
from
November 27, 2017 12:17
1b8277a
to
ef27218
Compare
mysociety-pusher
force-pushed
the
send-messages-via-writeinpublic
branch
from
November 29, 2017 10:09
1649cc2
to
9961380
Compare
mysociety-pusher
force-pushed
the
send-messages-via-writeinpublic
branch
2 times, most recently
from
December 1, 2017 16:40
0605eb8
to
3a411c3
Compare
5 tasks
Put everything inside a .person-write-form so it appears at the correct width.
Check that the recipients form has been filled in before trying to get cleaned data from it.
This allows us to link directly to the pre-filled draft step by including a ?person_id parameter in the URL with the id of the person we want to start writing to.
This links directly to the draft step with the persons name pre-filled.
This stops people from ending up on the draft or preview pages when there are no recipients.
This was changed in WriteInPublic because the popolo UUID isn't unique between different datasources, so we need to include the whole URI with the datasource prefix included, rather than just the UUID.
When sending the message we want to use flash messages to let the user know whether the action has succeeded or failed.
If the message is sent successfully then the user will be redirected to the individual message page, so we need to output the flash messages there. If there is an error while sending the message then the user gets sent back to the start of the message sending process, so the flash message needs to be shown then. Note: currently if there is an error then the users message is lost, which isn't ideal, but it's at least _slightly_ better to send them back to the start of the process rather than showing them a 500 error.
By using a custom exception which wraps the requests exception we make it easier for the calling code to catch the exception without needing to import requests.
If there's a problem connecting to writeinpublic then we want to catch that exception and show an error message to the user.
mysociety-pusher
force-pushed
the
send-messages-via-writeinpublic
branch
from
February 1, 2018 18:26
ccafb43
to
3e40a3f
Compare
chrismytton
changed the base branch from
master
to
add-person-everypolitician_uuid-method
February 5, 2018 17:55
chrismytton
changed the base branch from
add-person-everypolitician_uuid-method
to
master
February 5, 2018 17:55
This was referenced Feb 6, 2018
Merged
This was split up into separate pull requests (the "merged" PRs referenced above), so the code from this is now on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Outstanding tasks
Notes to merger
Fixes #2326