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
|
2014-05-08 16:59:35 +00:00
|
|
|
from orchestra.apps.accounts.serializers import AccountSerializerMixin
|
|
|
|
|
|
|
|
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')
|