I am new to Django. I am going to build simple register and login fullstack application by using React and Django. My problem is when I received register request with form data. Is it ok to create custom table for users? I am going to create another table related to user table. So in that case, there must be id in the users. That's why I am going to create custom table. Please help me it is good practice.
CodePudding user response:
You can abstract from AbstractBaseUser
and then you can customise the user model and socspecify it in your settings file
CodePudding user response:
In Django you can link between multiple table by different relationships depends on what you want like:
OneToOne
ForeignKey
ManyToMany
And by default when you create a model django create a pk field it is ID for table, you can make another field as a primary key for model
When you use one of those relationships django by default use model id to link between them
and you can also create a custom user model to use it
Good luck