2014-05-08 16:59:35 +00:00
|
|
|
from orchestra.api.fields import OptionField
|
2014-10-15 21:18:50 +00:00
|
|
|
from orchestra.api.serializers import HyperlinkedModelSerializer
|
2015-04-05 10:46:24 +00:00
|
|
|
from orchestra.contrib.accounts.serializers import AccountSerializerMixin
|
2014-05-08 16:59:35 +00:00
|
|
|
|
|
|
|
from .models import WebApp
|
|
|
|
|
|
|
|
|
2014-10-15 21:18:50 +00:00
|
|
|
class WebAppSerializer(AccountSerializerMixin, HyperlinkedModelSerializer):
|
2014-05-08 16:59:35 +00:00
|
|
|
options = OptionField(required=False)
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
model = WebApp
|
|
|
|
fields = ('url', 'name', 'type', 'options')
|
2014-10-15 21:18:50 +00:00
|
|
|
postonly_fields = ('name', 'type')
|