Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialHasan Ahmad
6,727 PointsThe User model
What is the User
model for? I do not understand the purpose of it. Please explain to me what this model does.
1 Answer
dublinruncommutr
5,944 PointsUser model is used by Django admin backend. Can also be used in the front-end for authentication or you can extend to support additional functionalities (perhaps you want to store other user attributes like photo, height, weight, etc.).
The Django docs discusses it pretty comprehensively: https://docs.djangoproject.com/en/2.0/topics/auth/customizing/
I have a Django app that extends the AUTH_USER_MODEL for leveraging social media accounts for trusted login to my app. It really can be quite useful to read up on what you can do with the User model - hopefully this helps a little bit - I'm sure I've only touched on a fraction of what you can do with it.