1👍
✅
Comparing your traceback and your code, you can find that error happens here:
WidgetList.objects.create(user=instance)
Your model WidgetList
doesn’t even have user
field, so it’s pretty obvious that you cannot do that. Maybe you were copying & paste the code that caused an error.
1👍
- There is no user in your model. Which I see you mean owner.
- You will get foreign key ref errors as there is not data. Load some parent data using fixture. That would solve this issue.
- [Answered ]-Django – how to query user profile based on User model having OneToOneField
- [Answered ]-Change widget from select to check box in generic class based view
- [Answered ]-Django JsonResponse return no data
- [Answered ]-Correctly exhibiting date from datapicker
- [Answered ]-Django define default view with IP address
Source:stackexchange.com