Skip to content

Conversation

@brndd
Copy link
Contributor

@brndd brndd commented Nov 21, 2025

Combines PRs #611 and #613, which have a cross-dependency, into one easier-to-merge PR, as per request.


This PR adds multilingual support for MemberService name and description using django-modeltranslation. Admin integration is enabled so both Finnish and English fields are editable in the Django admin interface.

Closes #596 (service name localization).

Adds description field to MemberService (related to #464). This does not resolve #464 yet, but provides groundwork that may help address it later.

Näyttökuva 2025-10-08 142100

This PR adds a new multi-step registration form.
The screenshots below demonstrate how it works.

  • Added "registration_form.py" and templates under "www/templates/www/registration/".

  • Adds/Needs related changes: Add localization support for MemberService fields Add localization support for MemberService fields #611

  • Reuses "RegistrationServicesForm", "RegistrationApplicationForm", "RegistrationUserForm" from "forms.py".

  • Removed "thanks.html", "register.html" and register() from views.py (replaced by new).

first second third fourth success

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a multi-step registration form with improved UX and adds multilingual support (Finnish/English) for MemberService name and description fields using django-modeltranslation.

Key Changes:

  • New multi-step registration wizard using django-formtools with 4 steps: Personal Info, Contact Details, Services, and Agreement
  • MemberService model localization for name and description fields via django-modeltranslation
  • Added registration_form_visible field to MemberService for better control over which services appear in registration

Reviewed Changes

Copilot reviewed 24 out of 25 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
www/registration_form.py New multi-step registration wizard implementation with form classes and custom service radio widget
www/views.py Removed old single-page register() function, added new success page view
www/urls.py Updated URL patterns to use new wizard view and success page
www/templates/www/registration/*.html New template files for each step of the registration wizard
www/templates/www/thanks.html Removed old thanks page (replaced by success.html)
www/templates/www/register.html Removed old registration template
users/models/member_service.py Added description and registration_form_visible fields to MemberService
users/translation.py New file registering MemberService fields for translation
users/migrations/0031_*.py Migration adding new fields and translation columns
Pipfile Added django-modeltranslation and django-formtools dependencies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


if service.pays_also_service:
option['includes_service'] = service.pays_also_service.name
except (MemberService.DoesNotExist, ValueError):
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

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

'except' clause does nothing but pass and there is no explanatory comment.

Suggested change
except (MemberService.DoesNotExist, ValueError):
except (MemberService.DoesNotExist, ValueError):
# If the service does not exist or the value is invalid, skip adding extra details.

Copilot uses AI. Check for mistakes.
services.append(service)
if service.pays_also_service:
services.append(service.pays_also_service)
except MemberService.DoesNotExist:
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

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

'except' clause does nothing but pass and there is no explanatory comment.

Suggested change
except MemberService.DoesNotExist:
except MemberService.DoesNotExist:
# It's possible the selected service no longer exists; ignore and proceed without it.

Copilot uses AI. Check for mistakes.
subscribed_services.add(service)
if service.pays_also_service:
subscribed_services.add(service.pays_also_service)
except MemberService.DoesNotExist:
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

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

'except' clause does nothing but pass and there is no explanatory comment.

Copilot uses AI. Check for mistakes.
Adds a password field to the registration form (I can't believe this was not already on there).

Rearranges the registration form's steps a little: first step is personal information, second step is account information used for login etc.
@brndd
Copy link
Contributor Author

brndd commented Nov 24, 2025

I noticed the registration form never asks the user for their password, so seemingly every new user had to go through the "Forgot password?" procedure after joining to be able to actually log in. This was the case even with the existing registration form.

I added a password field and reorganized the form slightly. Personal info (name, residence, d.o.b. etc.) is now on the first page of the form, and the second page is exclusively for info that's required for login and door access (email, phone, password).

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.

Enable localizing service names Simplify optional member services and their checkboxes

2 participants