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

24 lines
739 B
Python
Raw Normal View History

2014-10-10 17:17:20 +00:00
from django import forms
2014-10-11 16:21:51 +00:00
from django.utils.safestring import mark_safe
2014-10-10 17:17:20 +00:00
from django.utils.translation import ugettext_lazy as _
2014-11-20 15:34:59 +00:00
from rest_framework import serializers
2014-10-10 17:17:20 +00:00
2014-11-20 15:34:59 +00:00
from .options import SoftwareService, SoftwareServiceForm
2014-10-10 17:17:20 +00:00
2014-11-20 15:34:59 +00:00
class WordPressForm(SoftwareServiceForm):
email = forms.EmailField(label=_("Email"), widget=forms.TextInput(attrs={'size':'40'}))
2014-10-10 17:17:20 +00:00
2014-11-20 15:34:59 +00:00
class WordPressDataSerializer(serializers.Serializer):
email = serializers.EmailField(label=_("Email"))
2014-10-10 17:17:20 +00:00
2014-11-10 17:18:04 +00:00
class WordPressService(SoftwareService):
2014-10-11 12:43:08 +00:00
verbose_name = "WordPress"
2014-10-11 16:21:51 +00:00
form = WordPressForm
2014-11-20 15:34:59 +00:00
serializer = WordPressDataSerializer
2014-10-11 12:43:08 +00:00
icon = 'saas/icons/WordPress.png'
2014-11-20 15:34:59 +00:00
site_name_base_domain = 'blogs.orchestra.lan'
change_readonly_fileds = ('email',)