django-orchestra-test/orchestra/contrib/saas/services/moodle.py
Jorge Pastor 39eea70b79 inicio 2023/07/09
edited 2023/11/24 by pedro
2023-11-24 02:23:54 +01:00

26 lines
773 B
Python

from django import forms
from django.utils.translation import gettext_lazy as _
from orchestra.forms.widgets import SpanWidget
from .. import settings
from ..forms import SaaSPasswordForm
from .options import SoftwareService
class MoodleForm(SaaSPasswordForm):
admin_username = forms.CharField(label=_("Admin username"), required=False,
widget=SpanWidget(display='admin'))
class MoodleService(SoftwareService):
name = 'moodle'
verbose_name = "Moodle"
form = MoodleForm
description_field = 'site_name'
icon = 'orchestra/icons/apps/Moodle.png'
site_domain = settings.SAAS_MOODLE_DOMAIN
allow_custom_url = settings.SAAS_MOODLE_ALLOW_CUSTOM_URL
db_name = settings.SAAS_MOODLE_DB_NAME
db_user = settings.SAAS_MOODLE_DB_USER