class Tld(models.Model): #TODO...resolve `User` table issue for FKtoClient
#other fields
FKtoClient = models.ForeignKey('User', on_delete=models.PROTECT)
当我尝试运行时:
python ../manage.py makemigrations Myapp
它说:
Myapp.Tld.FKtoClient: (fields.E300) Field defines a relation with model 'User', which is either not installed, or is abstract.
Myapp.Tld.FKtoClient: (fields.E307) The field Myapp.Tld.FKtoClient was declared with a lazy reference to 'Myapp.user', but app 'Myapp' doesn't provide model 'user'.
我该如何解决这个问题?
谢谢。