2👍
It sounds like you have to specify db_column
, to let Django know the name of the column in the PatientMed
column.
class PatientMed(models.Model):
circdetect = models.ForeignKey(CircDetect, on_delete=models.CASCADE, db_column='circdetect', to_field='oid')
0👍
You haven’t written the instruction that makes the error. But it seems that you have another table named PatientInfo that the error is related to.
- [Answered ]-Django date time filter?
- [Answered ]-How does Django RESTful Framework get user model from token from HTTP header?
- [Answered ]-Deployment of django using nginx
0👍
I’m not sure what was the cause of the problem. I solved it by dropping my database and recreating it and my entities.
Thank you everyone.
- [Answered ]-Can not add bootstrap class with button using Django and Python
- [Answered ]-Multiple django projects on apache [UPDATE]
- [Answered ]-How to POST with a field which is not specified in Form's Meta fields?
Source:stackexchange.com