Forms¶
Model forms are provided for convenience and can be fed specific kwargs in order to ensure that users are not presented with choices that should not be permitted.
-
class
fiction_outlines.forms.CharacterInstanceForm(*args, **kwargs)[source]¶ Bases:
django.forms.models.ModelFormForm for creating character instances
Takes an additional kwarg of
characterwhich should represent a Character instance.
-
class
fiction_outlines.forms.LocationInstanceForm(*args, **kwargs)[source]¶ Bases:
django.forms.models.ModelFormForm for creating location instances.
Takes an additional kwarg of
locationwhich should represent an instance of Location.
-
class
fiction_outlines.forms.CharacterForm(*args, **kwargs)[source]¶ Bases:
django.forms.models.ModelFormForm for Character model.
Takes an additional kwarg of
userwhich should represent an instance ofAUTH_USER_MODEL.
-
class
fiction_outlines.forms.LocationForm(*args, **kwargs)[source]¶ Bases:
django.forms.models.ModelFormForm class for Locations
Takes an additional kwarg of
userwhich should represent an instance ofAUTH_USER_MODEL.
-
class
fiction_outlines.forms.OutlineForm(*args, **kwargs)[source]¶ Bases:
django.forms.models.ModelFormForm class for Outline model
Takes an additional kwarg of
userwhich should represent an instance ofAUTH_USER_MODEL.
-
class
fiction_outlines.forms.OutlineMoveNodeForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=':', empty_permitted=False, instance=None, **kwargs)[source]¶ Bases:
treebeard.forms.MoveNodeFormSubclass of base
treebeardmove node form allowing us to restrict target node options to within a single tree.It is recommended that you do not subclass or directly call this form, but instead use treebeard.forms.movenodeform_factory.
Example:
from treebeard.forms import movenodeform_factory from fiction_outlines import forms from fiction_outlines.views import ArcNodeMoveView class SomeFormOrModelView(ArcNodeMoveView): model = ArcElementNode # As an example form_class = movenodeform_factory(ArcElementNode, form=forms.OutlineMoveNodeForm, ...) ...