src/p4l/api/views.py
author cavaliet
Wed, 04 Sep 2013 16:56:55 +0200
changeset 36 08cffedf6e60
parent 16 19fe06edb58d
child 104 b66ca6275115
permissions -rw-r--r--
first step of semantic tree, just to save. it will not be used as this in this project.

# -*- coding: utf-8 -*-
'''
Created on Sep 2, 2013

@author: ymh
'''
from p4l.api.serializers import RecordSerializer
from p4l.models import Record
from rest_framework import viewsets

class RecordViewSet(viewsets.ModelViewSet):
    '''
    API endpoint that allow Record to be viewed or edited
    '''

    queryset = Record.objects.all()
    serializer_class = RecordSerializer
    lookup_field = 'identifier'