WesternFriend / westernfriend.org

A website for Western Friend (westernfriend.org), a Quaker publication that provides resources and support for Quaker communities and individuals seeking to live out their faith in the world. Western Friend is part of the Religious Society of Friends.
https://westernfriend.org
GNU Affero General Public License v3.0
57 stars 39 forks source link

Note to newly regsitering users #961

Open marycklein opened 11 months ago

marycklein commented 11 months ago

When a person "registers," they get no feedback, but are just tossed back onto home page with no evidence of success.

Instead, could they be rewarded with a message that says something like: "Thanks for starting to register an account on our website. To complete your registration, please check your email for an message from us. You should have just received one. Please look in your spam / junk folder if our message is not in your inbox.

Also, Please revise the message they get in that email so that it says something like: "Thanks for beginning your registration process on the Western Friend website. To complete your registration, click on the link below. If the link doesn't respond, please cut an paste it into your browser, then hit your return key.

Task

Resources

This project is already configured to use and correctly messages from the Django messages framework. So, we should only need a small change to trigger the message, as described in the Django messages documentation.

check_email_message = "Thanks for starting to register an account on our website. To complete your registration, please check your email for an message from us. You should have just received one. Please look in your spam / junk folder if our message is not in your inbox"

messages.info(request, check_email_message)

The message should be added within a callback of our CustomRegistrationView such as the form_valid handler which redirects to the main page:

https://github.com/WesternFriend/westernfriend.org/blob/a138f1bd251bac71f85dd198743e4c587da5514c/accounts/views.py#L12-L23

The above code could be extended with the following form_valid method:

def form_valid(self, form):
    check_email_message = "Thanks for starting to register an account on our website. To complete your registration, please check your email for an message from us. You should have just received one. Please look in your spam / junk folder if our message is not in your inbox"
    # notice we use `self.request` here since the request is a member of the CustomRegistrationView instance
    messages.info(self.request, check_email_message)

    return super().form_valid(form)
sim-codes commented 4 months ago

I want to work on this

brylie commented 4 months ago

@sim-codes, I've updated the issue description to include two tasks:

The related PR currently only contains the changes to the email template. So, we will need to also display instructions to check the registrants email on the website using the Django messages framework.

brylie commented 4 months ago

I've updated the issue description to contain the particular code to change. Please try the instructions/code in the new description and let me know if you encounter any difficulties.