Closed EricTRL closed 11 months ago
Attention: 10 lines
in your changes are missing coverage. Please review.
Comparison is base (
70e3d00
) 95.84% compared to head (4de1905
) 96.07%.:exclamation: Current head 4de1905 differs from pull request most recent head 46320d1. Consider uploading reports for the commit 46320d1 to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Some screenshots of the features can be found below
Adds a registration form in the Member admin panel that allows sending a registration email to the registered member. This email allows the registered member to create (or log in to) a Squire account in order to link it to the registered membership data. This form also allows the admin to immediately add rooms or add a membership for an active year.
This works identical to Django's password reset emails. A token is generated and attached to a URL in an email. When visited, the URL token is verified and stored in the session data to prevent HTTP Referer leaks. Further views retrieve the token from the session data (and verify it again). Tokens expire in 3 days.
When a user that is not logged in visits the URL, they are redirected to a registration form with the option to also log in with an existing account. If a user is already logged in and visits the URL, they are redirected to a login form with no option for a new account registration. If the logged in user is already a member, or if (another) user was already linked to the member, the URL won't work.
A few utilities are introduced as well:
OtherSelectWidget
. A radio button-based widget that also includes an "other" option for a free text entry. Useful in case some options are very common (e.g. country, educational institution)ModelAdminFormViewMixin
andFieldsetAdminFormMixin
. A view-form pair that allows using some of DjangoModelAdmin
's features, notably fieldsets or default widgets (e.g. admin datetime picker). Useful for additional forms on the admin panel.New dependencies:
Future work (not this PR):