django-orchestra-test/orchestra/apps/webapps/serializers.py

15 lines
412 B
Python
Raw Normal View History

2014-05-08 16:59:35 +00:00
from rest_framework import serializers
from orchestra.api.fields import OptionField
from orchestra.apps.accounts.serializers import AccountSerializerMixin
from .models import WebApp
class WebAppSerializer(AccountSerializerMixin, serializers.HyperlinkedModelSerializer):
options = OptionField(required=False)
class Meta:
model = WebApp
fields = ('url', 'name', 'type', 'options')