def setUpClass(cls): super().setUpClass() safe_register(FormPlugin) safe_register(FormFieldPlugin) safe_register(WidgetPlugin) safe_register(InputPlugin) safe_register(TextInputPlugin) safe_register(NumberInputPlugin) safe_register(EmailInputPlugin) safe_register(URLInputPlugin) safe_register(PasswordInputPlugin) safe_register(HiddenInputPlugin) safe_register(MultipleHiddenInputPlugin) safe_register(FileInputPlugin) safe_register(ClearableFileInputPlugin) safe_register(TextareaPlugin) safe_register(DateTimeBaseInput) safe_register(DateInputPlugin) safe_register(DateTimeInputPlugin) safe_register(TimeInputPlugin) safe_register(CheckboxInputPlugin) safe_register(ChoiceWidgetPlugin) safe_register(SelectPlugin) safe_register(NullBooleanSelectPlugin) safe_register(SelectMultiplePlugin) safe_register(CheckboxSelectMultiplePlugin) safe_register(MultiWidgetPlugin) safe_register(SplitDateTimeWidgetPlugin) safe_register(SplitHiddenDateTimeWidgetPlugin) safe_register(SelectDateWidgetPlugin)
def setUpClass(cls): super().setUpClass() safe_register(FormPlugin) safe_register(ChoiceFieldPlugin) safe_register(ChoiceOptionPlugin)
def setUpClass(cls): super().setUpClass() safe_register(FormPlugin) safe_register(FormFieldPlugin) safe_register(CharFieldPlugin) safe_register(IntegerFieldPlugin) safe_register(FloatFieldPlugin) safe_register(DecimalFieldPlugin) safe_register(BaseTemporalFieldPlugin) safe_register(DateFieldPlugin) safe_register(TimeFieldPlugin) safe_register(DateTimeFieldPlugin) safe_register(DurationFieldPlugin) safe_register(RegexFieldPlugin) safe_register(EmailFieldPlugin) safe_register(FileFieldPlugin) safe_register(ImageFieldPlugin) safe_register(URLFieldPlugin) safe_register(BooleanFieldPlugin) safe_register(NullBooleanFieldPlugin) safe_register(ChoiceFieldPlugin) safe_register(TypedChoiceFieldPlugin) safe_register(MultipleChoiceFieldPlugin) safe_register(TypedMultipleChoiceFieldPlugin) safe_register(ComboFieldPlugin) safe_register(MultiValueFieldPlugin) safe_register(FilePathFieldPlugin) safe_register(SplitDateTimeFieldPlugin) safe_register(GenericIPAddressFieldPlugin) safe_register(SlugFieldPlugin) safe_register(UUIDFieldPlugin)
def setUpClass(cls): super().setUpClass() safe_register(ButtonPlugin) safe_register(SubmitButtonPlugin) safe_register(ResetButtonPlugin) safe_register(CustomButtonPlugin)
def setUpClass(cls): super().setUpClass() safe_register(FormPlugin) safe_register(ModelFormPlugin) safe_register(SavingFormPlugin) safe_register(MyFormPlugin)
from cms_forms.importer import TypeReference from cms_forms.plugins.fields import CharFieldPlugin, GenericIPAddressFieldPlugin from cms_forms.plugins.forms import SavingFormPlugin from cms_forms.plugins.buttons import SubmitButtonPlugin from cms_forms.models import FormSubmission from tests.utils import PluginTestCase, safe_register # Get config app_host = os.environ.get("APP_HOST", "localhost") app_port = os.environ.get("APP_PORT", "8000") hub_host = os.environ.get("HUB_HOST", "localhost") hub_port = os.environ.get("HUB_PORT", "4444") app_url = f"http://{app_host}:{app_port}/" # Init CMS objects safe_register(SavingFormPlugin) safe_register(CharFieldPlugin) safe_register(GenericIPAddressFieldPlugin) user = get_user_model().objects.create_superuser("admin", "*****@*****.**", "admin") page = PluginTestCase.create_homepage( None, title="home", template="base.html", language="en-us", created_by=user, ) placeholder = page.placeholders.all().first() form = add_plugin( placeholder=placeholder, plugin_type=SavingFormPlugin,
def setUpClass(cls): super().setUpClass() safe_register(FormPlugin) safe_register(FormFieldPlugin)