Skip to content
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

End states for mentorship requests #163

Merged
merged 5 commits into from
Jan 22, 2021

Conversation

ecxia
Copy link
Contributor

@ecxia ecxia commented Nov 1, 2020

Closes #124. Sorry this one is a bit bulky - some of the cleanup stuff should have been added to a different pull request.

Request detail template:

  • Updates to include ability to complete requests. Either party to an accepted request can unilaterally do this.
  • Also creates portion of template shown for completed request

Request list template:

  • Updates request list to show badges for completed requests.
  • Also cleans up request lists so all have uniform behavior (not showing ignored requests)

Models:

  • Adds COMPLETED to list of possible statuses
  • In save method, reshuffles local variables & context sent to email so can send two emails (one to requestor, one to requestee) in a single call
  • Updates save method so that when request status is set to COMPLETED, sends emails notifying both requestor and requestee.

Email templates:

  • Creates base "mentorship completed" email template and extends for requestor and requestee

Tests

  • Slimmed down setup a bit by using create_test_users function instead of creating all objects associated with a user separately.
  • Created unit test for request completion behavior (request & offer versions)
  • Created unit tests for complete request view

views, URLs

  • added "complete request" view

),
"requestee_profile_url": reverse(
"profile", args=[requestee_profile.id]
),
"request_detail_url": reverse("request_detail", args=[self.id]),
"APP_URL": os.getenv("APP_URL"),
}

if self.status == 0:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non blocking but could we change these to check against the static named variables instead of numbers?

@ecxia ecxia merged commit a275cad into chicagopython:master Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support End States for Requests
2 participants