mewlo.mpacks.core.form.mform module

mform.py This file contains base form class

class mewlo.mpacks.core.form.mform.BigStringField(label=None, validators=None, filters=(), description=u'', id=None, default=None, widget=None, _form=None, _name=None, _prefix=u'', _translations=None)[source]

Bases: wtforms.fields.core.StringField

class mewlo.mpacks.core.form.mform.DisabledStringField(label=None, validators=None, filters=(), description=u'', id=None, default=None, widget=None, _form=None, _name=None, _prefix=u'', _translations=None)[source]

Bases: wtforms.fields.core.StringField

class mewlo.mpacks.core.form.mform.MewloForm(*args, **kwargs)[source]

Bases: wtforms.form.Form

class Meta[source]
csrf = False
MewloForm.add_fielderror(fieldname, errorstr)[source]
MewloForm.add_genericerror(errorstr, separator='n')[source]

Add a generic error to form not tied to a field; this is our own kludge.

MewloForm.get_genericerrorstr(defaultval=None)[source]

Return generic form error.

MewloForm.get_val(key, defaultval=None)[source]

Get one value.

MewloForm.get_val_nonblank(key, defaultval=None)[source]

Get one value.

MewloForm.get_viewfilename(defaultval=None)[source]

A form can store the view file it normally uses.

MewloForm.hasfield(key)[source]

Return True if the form has a field of this name.

MewloForm.merge_errordict(errordict)[source]

Merge dictionary of errors into form.

MewloForm.set_onevalue(key, val)[source]

Set one value key.

MewloForm.set_values_from_dict(form_dict)[source]

Set form values manually.

MewloForm.setfield_ifblank(key, val)[source]

Set value if empty.