django-orchestra/orchestra/contrib/saas/services/wordpress.py

28 lines
810 B
Python
Raw Normal View History

2015-03-23 15:36:51 +00:00
from django import forms
from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
from .options import SoftwareService, SoftwareServiceForm
class WordPressForm(SoftwareServiceForm):
email = forms.EmailField(label=_("Email"), widget=forms.TextInput(attrs={'size':'40'}))
class WordPressDataSerializer(serializers.Serializer):
email = serializers.EmailField(label=_("Email"))
class WordPressService(SoftwareService):
2015-06-09 11:16:36 +00:00
name = 'wordpress'
2015-03-23 15:36:51 +00:00
verbose_name = "WordPress"
form = WordPressForm
serializer = WordPressDataSerializer
icon = 'orchestra/icons/apps/WordPress.png'
change_readonly_fileds = ('email',)
2015-06-09 11:16:36 +00:00
@property
def site_base_domain(self):
from .. import settings
return settings.SAAS_WORDPRESS_BASE_DOMAIN