-
Notifications
You must be signed in to change notification settings - Fork 0
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
[SC-16] Added account model #14
Conversation
) | ||
first_name = models.CharField(_("first name"), max_length=150, blank=True) | ||
last_name = models.CharField(_("last name"), max_length=150, blank=True) | ||
is_staff = models.BooleanField( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm not fully sure if is_staff and is_active are really required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just emulating the default Django user model since they have the staff accounts that can access the admin site. Not too sure if the is_active
field is needed, but also present in the default Django user model.
@@ -0,0 +1,31 @@ | |||
from django.contrib.auth.base_user import BaseUserManager | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might have to utilize serializers instead of doing it this way. This is important since we will be using django with the rest framework
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this cause most of the tutorials used this method to get rid of usernames for User
accounts. This is just overriding the actual model creation and is based on the default Django UserManager
. Not really sure if we can get away with not using this.
Added basic account model to Django for future use.