I am using django-salesforce
and I would like to create a model within Django that has a ForeignKey
field pointing to a SFDC model (hosted on force.com).
I created a custom model on force.com, let us call it SFModel
, and I can successfully work on it from django (CRUD) by subclassing salesforce.models.Model
.
I also created a django.db.models.Model
, let us call it DJModel
, that has a unique field ForeignKey(SFModel)
. This model is registered on the admin panel.
All models validate and I can go to my admin panel to try to create a new instance of DJModel
. However, when I try to display the create_form in the admin I get the following error :
hasattr(): attribute name must be string
and the debug stream says
So I tried to set an arbitrary alias to the SF entry in the DATABASES
of my settings.py
. There is a dedicated variable for that :
SALESFORCE_DB_ALIAS = 'youralias'
But I still have the same problem.
Any recommendation?