Core formuláře

Definice formulářů a widget použitých v celé aplikaci.

class core.forms.SelectMultipleSeparator(attrs={'class': 'selectpicker', 'data-live-search': 'true', 'data-multiple-separator': '; '}, choices=())

Override nad widgetom na zobrazení multi selectu stejně v každém formuláři.

class core.forms.TwoLevelSelectField(*, max_length=None, min_length=None, strip=True, empty_value='', **kwargs)

Potrebná úprava metód pro Charfield ve formuláři, pokud se používa widget se zobrazením dvou-stupňového seznamu.

to_python(selected_value)

Return a string.

has_changed(initial, data) bool

Return True if data differs from initial.

class core.forms.HeslarChoiceFieldField(*, choices=(), **kwargs)

Potrebná úprava metód pro ChoiceField ve formuláři, pro správne zobrazení a spracováni predmetu specifikace.

clean(selected_value)

Validate the given value and return its „cleaned“ value as an appropriate Python object. Raise ValidationError for any errors.

to_python(selected_value)

Return a string.

has_changed(initial, data) bool

Return True if data differs from initial.

class core.forms.CheckStavNotChangedForm(db_stav=None, require_confirmation=False, dokument_warnings=None, *args, **kwargs)

Formulář pro kontrolu jestli se stav záznamu nezmenil mezi jeho načtením a odeslánim zmeny. Celá logika je v clean metóde.

clean()

Hook for doing any extra form-wide cleaning after Field.clean() has been called on every field. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field named ‚__all__‘.

class core.forms.VratitForm(*args, **kwargs)

Formulář pro vrácení záznamu. Obsahuje jen text pole pro zdůvodnění vrácení.

class core.forms.DecimalTextWideget(attrs=None)

Třida pro formátování hodnoty velikosti souboru na 3 desetiná místa.

format_value(value)

Return a value as it should appear when rendered in a template.

class core.forms.OdstavkaSystemuForm(*args, **kwargs)

Formulář pro nastavení a úpravu odstávky. Vrámci načítáni formuláře se doplní načítají hodnoty z template odstávky.

class core.forms.PermissionImportForm(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, bound_field_class=None)
class core.forms.PermissionSkipImportForm(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, bound_field_class=None)
class core.forms.BaseFilterForm(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, bound_field_class=None)
clean()

Hook for doing any extra form-wide cleaning after Field.clean() has been called on every field. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field named ‚__all__‘.

class core.forms.TransaltionImportForm(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, bound_field_class=None)
clean()

Hook for doing any extra form-wide cleaning after Field.clean() has been called on every field. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field named ‚__all__‘.

class core.forms.ImportDataAdminForm(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, bound_field_class=None)