rdfframework.forms package

Submodules

rdfframework.forms.rdffields module

<<<<<<< HEAD class rdfframework.forms.rdffields.ButtonActionField(label=None, validators=None, filters=(), description='', id=None, default=None, widget=None, _form=None, _name=None, _prefix='', _translations=None, _meta=None)[source]

Bases: wtforms.fields.core.StringField

widget = <rdfframework.forms.widgets.formwidgets.ButtonActionWidget object at 0x04228A70>
======= class rdfframework.forms.rdffields.ButtonActionField(label=None, validators=None, filters=(), description='', id=None, default=None, widget=None, render_kw=None, _form=None, _name=None, _prefix='', _translations=None, _meta=None)[source]

Bases: wtforms.fields.core.StringField

widget = <rdfframework.forms.widgets.formwidgets.ButtonActionWidget object at 0x0000000004DBBEB8>
>>>>>>> a5695fbb03ed15b14f2816dc48517c6c08d2d200
rdfframework.forms.rdffields.add_field_attributes(wt_field, attributes)[source]
rdfframework.forms.rdffields.get_field_json(field, instructions, instance, user_info, item_permissions=None)[source]

This function will read through the RDF defined info and proccess the json to return the correct values for the instance, security and details

rdfframework.forms.rdffields.get_field_security_access(field, user_info, item_permissions=None)[source]

This function will return level security access allowed for the field

rdfframework.forms.rdffields.get_wtform_field(field, instance='', **kwargs)[source]

return a wtform field

rdfframework.forms.rdfforms module

class rdfframework.forms.rdfforms.Form(*args, **kwargs)[source]

Bases: flask_wtf.form.Form

This class extends the wtforms base form class to add rdfframework specific attributes and functions

add_props(prop_list)[source]

adds a new property/field to the form in all the correct locations

redirect_url(id_value=None, **kwargs)[source]

formats the redirect url for the form in its current state

remove_prop(prop)[source]

removes a prop completely from the form

reset_fields()[source]

fields are moved around during save process and if the validation fails this method will return the fields to their original locations

save()[source]

sends the form to the framework for saving

set_obj_data(**kwargs)[source]

sets the data for the current form paramters

**keyword arguments subject_uri: the URI for the subject class_uri: the rdf class of the subject

rdfframework.forms.rdfforms.get_form_instructions_json(instructions, instance)[source]

This function will read through the RDF defined info and proccess the json to retrun the correct instructions for the specified form instance.

rdfframework.forms.rdfforms.rdf_framework_form_factory(form_url, **kwargs)[source]
Generates a form class based on the form definitions in the
kds-app.ttl file
keyword Args:
class_uri: the classUri used for a form with loaded data
* has to be the class of the subject_uri for
the form data lookup

subject_uri: the uri of the object that you want to lookup is_subform: True or False. States whether the form is a subform

of another form

Module contents