C
C
carrallton2020-10-15 03:09:53
Django
carrallton, 2020-10-15 03:09:53

How to make an object when registering a user?

Hello, how to create a model in the application when registering a user?
For example, a model is created in Users and at the same time the Customer model

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim, 2020-10-15
@carrallton

This can be done with signals . Study this information and you will succeed.

S
Sergey Pankov, 2020-10-15
@trapwalker

You are misnaming the instance a bit. Model is a class, you create it yourself.
An instance is an instance of a class. is being created. surprisingly, by instantiating the class and then saving it to the database using the save() method

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question