django-piston

django-piston : Overriding default serialization in emitters

Hi ! I am currently writing an API for a django project, and using django-piston for this. However, I need to customize the way certain base types are serialized. More precisely, my models are subclassed from a special Model class, which inherits from django.db.models.base.ModelBase, but cannot be serialized as regular django models .....

Django-Piston - I Can't POST on a model with a ForeignKey

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. ...

How do I save a Django Model from request.POST?

I'm trying to save a new object from a django model using a POST data querydict. This is part of a PISTON handler. I've seen this done in numerous examples, but I just can't get it to work. Here is my code: class FestHandler(BaseHandler): model = Deal def create(self, request): """ Creates a new fest. ...