Forms

Base Classes

class django_logikal.forms.generic.ErrorList(*args: Any, **kwargs: Any)

Improved error list class.

class django_logikal.forms.generic.FormMeta

Metadata class for forms.

id: str

The form ID to use.

id_prefix = 'id_form'

The form ID prefix to use.

action_url_name: str

The URL name to use for the form action.

action_method = 'post'

The form action method to use.

render_tag = True

Whether to render the <form> tag.

header: str | Promise | None = None

The form header to use.

help_text: str | Promise | None = None

The form help text to use.

action_button_text: str | Promise | None = None

The text to use for the action button.

back_url_name: str | None = None

The URL name to use for the back action.

back_url_text: str | Promise = 'Back'

The text to use for the back button.

htmx_validation_trigger = 'change, keyup delay:250ms changed'

The htmx validation trigger.

class django_logikal.forms.generic.Form(*args: ~typing.Any, error_class: type[~django_logikal.forms.generic.ErrorList] = <class 'django_logikal.forms.generic.ErrorList'>, label_suffix: str = '', render_context: dict[str, ~typing.Any] | None = None, action_url_kwargs: dict[str, ~typing.Any] | None = None, back_url_kwargs: dict[str, ~typing.Any] | None = None, **kwargs: ~typing.Any)

Improved parent class for forms.

Meta: FormMeta

The form metadata class to use.

with_meta(**kwargs: Any) Self

Return the form with the updated metadata.

add_htmx_validation() None

Add htmx validation data fields to all fields with an htmx_validate attribute.

Data fields are only added when the htmx extra is installed. This method is automatically called during form initialization.

property media

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

Authentication

class django_logikal.forms.account.AuthForm(*args: ~typing.Any, error_class: type[~django_logikal.forms.generic.ErrorList] = <class 'django_logikal.forms.generic.ErrorList'>, label_suffix: str = '', render_context: dict[str, ~typing.Any] | None = None, action_url_kwargs: dict[str, ~typing.Any] | None = None, back_url_kwargs: dict[str, ~typing.Any] | None = None, **kwargs: ~typing.Any)
class Meta
id: str = 'auth'

The form ID to use.

action_url_name: str = 'account_auth'

The URL name to use for the form action.

action_button_text: StrOrPromise | None = 'Next'

The text to use for the action button.

property media

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

class django_logikal.forms.allauth.SignupForm(*args: Any, **kwargs: Any)
class Meta
id: str = 'signup'

The form ID to use.

action_url_name: str = 'account_signup'

The URL name to use for the form action.

action_button_text: StrOrPromise | None = 'Sign up'

The text to use for the action button.

back_url_name: str | None = 'account_auth'

The URL name to use for the back action.

property media

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

class django_logikal.forms.allauth.LoginForm(*args: Any, **kwargs: Any)
class Meta
id: str = 'login'

The form ID to use.

action_url_name: str = 'account_login'

The URL name to use for the form action.

action_button_text: StrOrPromise | None = 'Sign in'

The text to use for the action button.

back_url_name: str | None = 'account_auth'

The URL name to use for the back action.

property media

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

class django_logikal.forms.allauth.ResetPasswordForm(*args: ~typing.Any, error_class: type[~django_logikal.forms.generic.ErrorList] = <class 'django_logikal.forms.generic.ErrorList'>, label_suffix: str = '', render_context: dict[str, ~typing.Any] | None = None, action_url_kwargs: dict[str, ~typing.Any] | None = None, back_url_kwargs: dict[str, ~typing.Any] | None = None, **kwargs: ~typing.Any)
class Meta
id: str = 'reset_password'

The form ID to use.

action_url_name: str = 'account_reset_password'

The URL name to use for the form action.

header: StrOrPromise | None = 'Reset Password'

The form header to use.

help_text: StrOrPromise | None = 'Forgot your password? Enter your email address below, and we will send you a link to set a new password.'

The form help text to use.

action_button_text: StrOrPromise | None = 'Next'

The text to use for the action button.

back_url_name: str | None = 'account_login'

The URL name to use for the back action.

property media

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

class django_logikal.forms.allauth.ResetPasswordKeyForm(*args: Any, **kwargs: Any)
class Meta
id: str = 'reset_password_key'

The form ID to use.

action_url_name: str = 'account_reset_password_from_key'

The URL name to use for the form action.

header: StrOrPromise | None = 'Reset Password'

The form header to use.

action_button_text: StrOrPromise | None = 'Set password'

The text to use for the action button.

back_url_name: str | None = 'account_login'

The URL name to use for the back action.

property media

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

class django_logikal.forms.allauth.SetPasswordForm(*args: Any, **kwargs: Any)
class Meta
id: str = 'set_password'

The form ID to use.

action_url_name: str = 'account_set_password'

The URL name to use for the form action.

header: StrOrPromise | None = 'Set Password'

The form header to use.

action_button_text: StrOrPromise | None = 'Set password'

The text to use for the action button.

back_url_name: str | None = 'account'

The URL name to use for the back action.

property media

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

class django_logikal.forms.allauth.ChangePasswordForm(*args: Any, **kwargs: Any)
class Meta
id: str = 'change_password'

The form ID to use.

action_button_text: StrOrPromise | None = 'Change password'

The text to use for the action button.

header: StrOrPromise | None = 'Change Password'

The form header to use.

action_url_name: str = 'account_change_password'

The URL name to use for the form action.

back_url_name: str | None = 'account'

The URL name to use for the back action.

property media

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