tcms.kiwi_auth.forms module

class tcms.kiwi_auth.forms.CustomCaptchaTextInput(attrs=None, id_prefix=None, generator=None)[source]

Bases: CaptchaTextInput

property media

Media for a multiwidget is the combination of all media of the subwidgets.

template_name = 'captcha_field.html'
class tcms.kiwi_auth.forms.PasswordResetForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]

Bases: PasswordResetForm

Overrides the default form b/c it uses Site.objects.get_current() which uses an internal cache and produces wrong results when kiwitcms-tenants is installed.

base_fields = {'captcha': <captcha.fields.CaptchaField object>, 'email': <django.forms.fields.EmailField object>}
declared_fields = {'captcha': <captcha.fields.CaptchaField object>, 'email': <django.forms.fields.EmailField object>}
property media

Return all media required to render the widgets on this form.

save(domain_override=None, subject_template_name='registration/password_reset_subject.txt', email_template_name='registration/password_reset_email.html', use_https=False, token_generator=<django.contrib.auth.tokens.PasswordResetTokenGenerator object>, from_email=None, request=None, html_email_template_name=None, extra_email_context=None)[source]

Generate a one-use only link for resetting password and send it to the user.

class tcms.kiwi_auth.forms.RegistrationForm(*args, **kwargs)[source]

Bases: UserCreationForm

class Meta[source]

Bases: object

fields = ('username',)
model

alias of User

base_fields = {'captcha': <captcha.fields.CaptchaField object>, 'email': <django.forms.fields.EmailField object>, 'password1': <django.forms.fields.CharField object>, 'password2': <django.forms.fields.CharField object>, 'username': <django.forms.fields.CharField object>}
declared_fields = {'captcha': <captcha.fields.CaptchaField object>, 'email': <django.forms.fields.EmailField object>, 'password1': <django.forms.fields.CharField object>, 'password2': <django.forms.fields.CharField object>}
property media

Return all media required to render the widgets on this form.

save(commit=True)[source]

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.

class tcms.kiwi_auth.forms.ResetUserEmailForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]

Bases: Form

base_fields = {'email_1': <django.forms.fields.EmailField object>, 'email_2': <django.forms.fields.EmailField object>}
clean_email_2()[source]
declared_fields = {'email_1': <django.forms.fields.EmailField object>, 'email_2': <django.forms.fields.EmailField object>}
property media

Return all media required to render the widgets on this form.

tcms.kiwi_auth.forms.custom_email_validators(email)[source]
tcms.kiwi_auth.forms.has_permissions_to_modify(pk)[source]
tcms.kiwi_auth.forms.send_confirmation_email_to(user, request, activation_key)[source]
tcms.kiwi_auth.forms.set_activation_key_for(user)[source]
tcms.kiwi_auth.forms.validate_email_already_in_use(email)[source]