Django REST Framework: определить поля во вложенном объекте?

У меня есть события, которые происходят в местах:

class Event(models.Model):
    title = models.CharField(max_length=200)
    date_published = models.DateTimeField('published date',default=datetime.now, blank=True)
    date_start = models.DateTimeField('start date')
    date_end = models.DateTimeField('end date')
    def __unicode__(self):
        return self.title
    description = models.TextField()
    price = models.IntegerField(null=True, blank=True)
    tags = TaggableManager()
    location = models.ForeignKey(Location, blank=False)

class Location(models.Model):
    location_title = models.CharField(max_length=200)
    location_date_published = models.DateTimeField('published date',default=datetime.now, blank=True)
    location_latitude = models.CharField(max_length=200)
    location_longitude = models.CharField(max_length=200)
    location_address = models.CharField(max_length=200)
    location_city = models.CharField(max_length=200)
    location_zipcode = models.CharField(max_length=200)
    location_state = models.CharField(max_length=200)
    location_country = models.CharField(max_length=200)
    location_description = models.TextField()
    def __unicode__(self):
        return u'%s' % (self.location_title)

Я могу получить результаты всего через:

class EventSerializer(serializers.HyperlinkedModelSerializer):
    id = serializers.Field()
    class Meta:
        model = Event
        depth = 2
        fields = ('url','id','title','date_start','date_end','description', 'price', 'location')

Какие выводы:

 {
            "url": "http://localhost:8000/api/event/3/", 
            "id": 3, 
            "title": "Testing", 
            "date_start": "2013-03-10T20:19:00Z", 
            "date_end": "2013-03-10T20:19:00Z", 
            "description": "fgdgdfg", 
            "price": 10, 
            "location": {
                "id": 2, 
                "location_title": "Mighty", 
                "location_date_published": "2013-03-10T20:16:00Z", 
                "location_latitude": "37.767475", 
                "location_longitude": "-122.406878", 
                "location_address": "119 Utah St, San Francisco, CA 94103, USA", 
                "location_city": "San Francisco", 
                "location_zipcode": "94103", 
                "location_state": "California", 
                "location_country": "United States", 
                "location_description": "Some place"
            }
        }, 

Тем не менее, я нене хочу, чтобы он захватил все поля, как я неМне не нужны все из них. Как я могу определить, какие поля должны быть получены из моего вложенного объекта? Спасибо!

Ответы на вопрос(3)

Ваш ответ на вопрос