django-orchestra-test/orchestra/contrib/saas/services/bscw.py

26 lines
718 B
Python
Raw Normal View History

2014-09-26 19:21:09 +00:00
from django import forms
from django.utils.translation import ugettext_lazy as _
2014-11-09 10:16:07 +00:00
from rest_framework import serializers
2014-09-26 19:21:09 +00:00
2015-03-23 15:36:51 +00:00
from .. import settings
2015-09-21 10:28:49 +00:00
from ..forms import SaaSPasswordForm
from .options import SoftwareService
2014-09-26 19:21:09 +00:00
2014-09-28 12:28:57 +00:00
2015-09-21 10:28:49 +00:00
class BSCWForm(SaaSPasswordForm):
2015-10-05 13:31:08 +00:00
email = forms.EmailField(label=_("Email"), widget=forms.TextInput(attrs={'size': '40'}))
2014-11-09 10:16:07 +00:00
2014-11-20 15:34:59 +00:00
class BSCWDataSerializer(serializers.Serializer):
2014-11-09 10:16:07 +00:00
email = serializers.EmailField(label=_("Email"))
2014-09-26 19:21:09 +00:00
class BSCWService(SoftwareService):
2015-03-23 15:36:51 +00:00
name = 'bscw'
2014-09-26 19:21:09 +00:00
verbose_name = "BSCW"
form = BSCWForm
2014-11-20 15:34:59 +00:00
serializer = BSCWDataSerializer
2015-03-04 21:06:16 +00:00
icon = 'orchestra/icons/apps/BSCW.png'
site_domain = settings.SAAS_BSCW_DOMAIN
2016-02-11 14:24:09 +00:00
change_readonly_fields = ('email',)