parler.forms module

The TranslatableModelForm class

class parler.forms.TranslatableModelForm(*args, **kwargs)

The model form to use for translated models.

The TranslatableModelFormMixin class


alias of parler.forms.BaseTranslatableModelForm

The TranslatedField class

class parler.forms.TranslatedField(**kwargs)

A wrapper for a translated form field.

This wrapper can be used to declare translated fields on the form, e.g.

class MyForm(TranslatableModelForm):
    title = TranslatedField()
    slug = TranslatedField()

    description = TranslatedField(form_class=forms.CharField, widget=TinyMCE)

Initialize self. See help(type(self)) for accurate signature.

The TranslatableBaseInlineFormSet class

class parler.forms.TranslatableBaseInlineFormSet(data=None, files=None, instance=None, save_as_new=False, prefix=None, queryset=None, **kwargs)

The formset base for creating inlines with translatable models.

save_new(form, commit=True)

Save and return a new model instance for the given form.