Error message
File "/Users/topaz/Desktop/Project/PWO/models.py", line 110, in UserProfile user = models.OneToOneField(User) TypeError: __init__() missing 1 required positional argument: 'on_delete'
Troubleshooting
1.Error throwing line user = models.OneToOneField(User) 2.Add models.CASCADE user = models.OneToOneField(User,models.CASCADE)
Reason:
The Django1.8 version was used for application before, the upgraded version Django2.0 has changed, need to set 'on_delete'= models.CASCADE.
Always keep learning.