I'm trying to set up piston on my Django project. I ran into a brick wall when I tried to POST (create) a new entry on a model that contains a ForeignKey: location.
Here is the exact error I receive:
Cannot assign "u'1'": "Fest.location" must be a "Location" instance.
In the above example, I tried to send over location=1
in the POST.
What am I doing wrong here? Surely Foreign Keys are supported on CREATEs...
===UPDATE===
To be clear, I'm using PISTON to handle these REST API requests. My Handler currently looks like this:
class FestHandler(BaseHandler):
model = Fest