Closed agavgavi closed 4 years ago
Nitpicks: We should add migrations to the .gitignore. Don’t use Custom, just say User or Admin. Concerns: One of the benefits of using the base User is its inclusion of password security so just make sure ours is also secure.
Migrations have been added to gitignore. CustomUse has been renamed to User, and the nice part about Subclassing AbstractUser is that we get all of the same password security that was already there.
So the default auth.User built into django is good, but working with it at times can be a pain so implementing a custom user model is always recommended. This custom model uses an email field instead of username as the basic form of logging in and requires the user to fill out a first name and last name as well.
Only issue is that now we have to always make sure we use that custom user rather than auth.User in all future views/whatever.
In addition, built a profile model that will be a 1-1 relationship with this new user, and have it automatically be created when a user is created. This model will be replacing the "users" model in the py4web version.
Also built a ticket model that is basically directly based off of the py4web version. Both of these models have CRUD features implemented through the Django REST Framework and have setup viewsets that need authentication.
Finally, deleted the other rest app Sam was working on since it had some conflicting user models and it wasn't feasible to integrate with both at the same time.