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

Fix/sorted section list 467 #789

Closed
wants to merge 2 commits into from
Closed

Conversation

hato1883
Copy link
Contributor

@hato1883 hato1883 commented Nov 1, 2023

Description of the Change

Changed the frontend register page to use CustomUserCreationForm from members.forms instead of RegistrationForm.
Also changed CustomUserCreationForm to provided a sorted section list (sorted by the section abbreviation) by using Section.objects.order_by('abbreviation') instead of Section.objects in the file src/members/forms.py.

Applicable Issues

fixes #467 and makes the sections ordered by their abbreviations

This is the same form that admin page uses when creating users.
RegistrationForm is not affected by change in forms.py in commit:
9be07d3
and thereby did not get a sorted section list from previous change.
I do not see the diffrence in accont creation between the two forms.
@hato1883
Copy link
Contributor Author

hato1883 commented Nov 8, 2023

Closing to evaluate if there is another solution to this that is not using the admin creation tool

@hato1883 hato1883 closed this Nov 8, 2023
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.

When you register an account, sections are not sorted
1 participant