|
I'm creating an app that involves the User saving "favorite places" pins from Google Maps to the db. So when creating the User model, it seems it's technically possible to extend AbstractUser and add the auth fields + favorite_places=models.ManyToManyField(). Experienced developers seem to recommend creating a separate model, something like Profile, and adding the additional field(s) there, and then creating a OneToOne relationship between Profile and User. Any thoughts on this? To me as a novice, having 1 User model that can take care of everything seems more attractive than having a User model for auth + a Profile model for additional info and creating a 1-to-1 relationship between them. Why is it advised to do this?
|
# ¿ Aug 2, 2022 20:37 |
|
|
# ¿ May 15, 2024 05:41 |