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

refactor: split users/models.py into individual files #421

Merged
merged 12 commits into from
Feb 9, 2023
Merged

refactor: split users/models.py into individual files #421

merged 12 commits into from
Feb 9, 2023

Conversation

braaar
Copy link
Collaborator

@braaar braaar commented Jan 31, 2023

So I figured I wanted move the model classes in users/model.py out to individual files since that will make it easier to modify and maintain the code.

In order to do so, I have created an __init__.py file that avoids breaking the old imports from models.py, and I have modified some of the models to use string references in Foreign keys instead of imported model references (avoiding circular dependency).

This PR also moves the validlators and the CustomUserManager (which is not a model) out to their own files (from models.py).

@braaar braaar changed the title refactor: move models to model folder refactor: split users/models.py into individual files Feb 1, 2023
@olmari olmari self-requested a review February 9, 2023 16:45
Copy link
Collaborator

@olmari olmari left a comment

Choose a reason for hiding this comment

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

Tried to do comprehensive enough spotchecking, nothing seemed to break, so LGTM.

@tswfi tswfi merged commit b6ec19f into TampereHacklab:master Feb 9, 2023
@tswfi
Copy link
Member

tswfi commented Feb 9, 2023

Thank you @braaar !!

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.

3 participants