Django does not create the following model.
from django.db import models from django.contrib.auth.models import User class Client(models.Model): user=models.ForeignKey(User,on_delete=models.CASCADE) contact_url=models.URLField(max_length=100) And no error appears (see picture)
And the strangest thing is that he creates other models, for example:
class Doctor(models.Model): name=models.CharField(max_length=100) Also I enter the python manage.py makemigrations app and python manage.py migrate
The model is successfully created and the corresponding table for it in the database app_doctor
I also tried to use the OneToOneField relation instead of the ForeignKey , but this did not give a result. Although according to official documentation it works fine. Tell me, what could be the matter?
