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

Configure default user model #917

Closed
brylie opened this issue Jun 11, 2021 · 7 comments
Closed

Configure default user model #917

brylie opened this issue Jun 11, 2021 · 7 comments

Comments

@brylie
Copy link
Member

brylie commented Jun 11, 2021

With recent work on a custom user model, we may have forgotten to configure Django to use the custom user model as default when creating new users.

Make sure our User model is configured as the project default (in the base settings).

class User(AbstractUser):
"""
A new custom User model for any functionality needed in the future. Extending AbstractUser
allows for adding new fields to the user model as needed.
"""
class Meta:
db_table = 'users'

@shashankks0987
Copy link
Contributor

@brylie I'd like to start contributing to this project and want to start off with this issue. Could you elaborate on this: User model is configured as the project default

@shashankks0987
Copy link
Contributor

Also nothing past the login page is developed yet right? Because after my local setup it sends me to /beta

@shashankks0987
Copy link
Contributor

Isn't this what you're looking for

# Custom User model
AUTH_USER_MODEL = 'accounts.User'

It is already present in settings.py @brylie

@brylie
Copy link
Member Author

brylie commented Jun 13, 2021

Thanks for the clarification @shashankks0987. I'll assign you to this issue and close it since you did the research and found there wasn't any code needed. In any case, this should count as a code contribution even though you didn't need to change anything.

So, the main task becomes to make sure we are using the correct user model in our login/register views #918 Would you consider contributing to issue #918 @shashankks0987?

@shashankks0987
Copy link
Contributor

Alright, you can close this. #918 is already implemented I guess, Is there anything I can take up?

@brylie
Copy link
Member Author

brylie commented Jun 14, 2021

@shashankks0987 try to reproduce/fix the bug report in #918. I think the register and login views are using the wrong user model. I have been able to reproduce the bug.

@brylie brylie closed this as completed Jun 14, 2021
@brylie
Copy link
Member Author

brylie commented Jun 14, 2021

@shashankks0987 would you be interested in refactoring our accounts code by moving from the api directory into the accounts app and renaming the Account model to Profile? #926

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants