Wiki Forms
inyoka.wiki.forms
Contains all the forms we use in the wiki.
- copyright:
2007-2024 by the Inyoka Team, see AUTHORS for more details.
- license:
BSD, see LICENSE for more details.
- class inyoka.wiki.forms.AddAttachmentForm(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)
Allows the user to upload new attachments. It’s used in the do_attach action and provides the following fields:
- attachment
A file field for the uploaded file.
- filename
The target filename. If this is left blank the original filename is used for the server too.
- override
A checkbox for the override flag. If this is true a filename with the same name is overridden (A new revision is created)
- text
The description of the attachment as textarea.
- note
A textfield for the change note.
- base_fields = {'attachment': <django.forms.fields.FileField object>, 'filename': <django.forms.fields.CharField object>, 'note': <django.forms.fields.CharField object>, 'override': <django.forms.fields.BooleanField object>, 'text': <django.forms.fields.CharField object>}
- declared_fields = {'attachment': <django.forms.fields.FileField object>, 'filename': <django.forms.fields.CharField object>, 'note': <django.forms.fields.CharField object>, 'override': <django.forms.fields.BooleanField object>, 'text': <django.forms.fields.CharField object>}
- property media
Return all media required to render the widgets on this form.
- class inyoka.wiki.forms.EditAttachmentForm(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)
A form for editing existing Attachments. For a more detailed description, have a look at the AddAttachmentForm.
- base_fields = {'attachment': <django.forms.fields.FileField object>, 'note': <django.forms.fields.CharField object>, 'text': <django.forms.fields.CharField object>}
- declared_fields = {'attachment': <django.forms.fields.FileField object>, 'note': <django.forms.fields.CharField object>, 'text': <django.forms.fields.CharField object>}
- property media
Return all media required to render the widgets on this form.
- class inyoka.wiki.forms.ManageDiscussionForm(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)
Let the user set an existing thread as discussion of a page
- base_fields = {'topic': <inyoka.utils.forms.TopicField object>}
- declared_fields = {'topic': <inyoka.utils.forms.TopicField object>}
- property media
Return all media required to render the widgets on this form.
- class inyoka.wiki.forms.MvBaustelleForm(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)
Move page to the “Baustelle
- base_fields = {'completion_date': <django.forms.fields.DateField object>, 'new_name': <django.forms.fields.CharField object>, 'user': <inyoka.utils.forms.UserField object>}
- declared_fields = {'completion_date': <django.forms.fields.DateField object>, 'new_name': <django.forms.fields.CharField object>, 'user': <inyoka.utils.forms.UserField object>}
- property media
Return all media required to render the widgets on this form.
- class inyoka.wiki.forms.NewArticleForm(user=None, reserved_names=[], template_choices=[], data=None)
Form for creating new wiki articles.
- base_fields = {'name': <django.forms.fields.CharField object>, 'template': <django.forms.fields.ChoiceField object>}
- clean_name()
Make sure page does not exist and user has privilege to create.
- clean_template()
Make sure user can access the chosen template.
- declared_fields = {'name': <django.forms.fields.CharField object>, 'template': <django.forms.fields.ChoiceField object>}
- property media
Return all media required to render the widgets on this form.
- class inyoka.wiki.forms.PageEditForm(user=None, name=None, revision=None, data=None)
Used in the do_edit action for existing pages. The following fields are available:
- text
The text of the page as textarea.
- note
A textfield for the change note.
- edit_time:
A DateTimeField for the time when the user started editing. This is used to determine if there are newer revisions and there may be an editing conflict.
- revision:
The revision the user is basing the edit on. Not necessarily the latest revision.
- base_fields = {'edit_time': <django.forms.fields.CharField object>, 'note': <django.forms.fields.CharField object>, 'revision': <django.forms.fields.CharField object>, 'text': <django.forms.fields.CharField object>}
- clean()
Test if we need to merge.
- clean_text()
- declared_fields = {'edit_time': <django.forms.fields.CharField object>, 'note': <django.forms.fields.CharField object>, 'revision': <django.forms.fields.CharField object>, 'text': <django.forms.fields.CharField object>}
- property media
Return all media required to render the widgets on this form.