Ikhaya Forms

inyoka.ikhaya.forms

Forms for the Ikhaya.

copyright:
  1. 2007-2024 by the Inyoka Team, see AUTHORS for more details.

license:

BSD, see LICENSE for more details.

class inyoka.ikhaya.forms.EditArticleForm(*args, **kwargs)
class Meta
exclude = ['updated', 'comment_count']
model

alias of Article

widgets = {'intro': <django.forms.widgets.Textarea object>, 'pub_date': <inyoka.utils.forms.DateWidget object>, 'pub_time': <inyoka.utils.forms.TimeWidget object>, 'subject': <django.forms.widgets.TextInput object>, 'text': <django.forms.widgets.Textarea object>}
_meta = <django.forms.models.ModelFormOptions object>
base_fields = {'author': <inyoka.utils.forms.UserField object>, 'category': <django.forms.models.ModelChoiceField object>, 'comments_enabled': <django.forms.fields.BooleanField object>, 'icon': <django.forms.models.ModelChoiceField object>, 'intro': <django.forms.fields.CharField object>, 'is_xhtml': <django.forms.fields.BooleanField object>, 'pub_date': <django.forms.fields.DateField object>, 'pub_time': <django.forms.fields.TimeField object>, 'public': <django.forms.fields.BooleanField object>, 'slug': <django.forms.fields.SlugField object>, 'subject': <django.forms.fields.CharField object>, 'text': <django.forms.fields.CharField object>, 'updated': <inyoka.utils.forms.DateTimeField object>}
clean_slug()
declared_fields = {'author': <inyoka.utils.forms.UserField object>, 'updated': <inyoka.utils.forms.DateTimeField object>}
property media

Return all media required to render the widgets on this form.

save()

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.

class inyoka.ikhaya.forms.EditCategoryForm(*args, **kwargs)
class Meta
exclude = ['slug']
model

alias of Category

_meta = <django.forms.models.ModelFormOptions object>
base_fields = {'icon': <django.forms.models.ModelChoiceField object>, 'name': <django.forms.fields.CharField object>}
declared_fields = {}
property media

Return all media required to render the widgets on this form.

class inyoka.ikhaya.forms.EditCommentForm(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)
base_fields = {'text': <inyoka.utils.forms.StrippedCharField object>}
declared_fields = {'text': <inyoka.utils.forms.StrippedCharField object>}
property media

Return all media required to render the widgets on this form.

class inyoka.ikhaya.forms.EditEventForm(*args, **kwargs)
class Meta
exclude = ['author', 'slug']
_meta = <django.forms.models.ModelFormOptions object>
base_fields = {'date': <django.forms.fields.DateField object>, 'description': <django.forms.fields.CharField object>, 'enddate': <django.forms.fields.DateField object>, 'endtime': <django.forms.fields.TimeField object>, 'location': <django.forms.fields.CharField object>, 'location_lat': <django.forms.fields.FloatField object>, 'location_long': <django.forms.fields.FloatField object>, 'location_town': <django.forms.fields.CharField object>, 'name': <django.forms.fields.CharField object>, 'time': <django.forms.fields.TimeField object>, 'visible': <django.forms.fields.BooleanField object>}
declared_fields = {'visible': <django.forms.fields.BooleanField object>}
property media

Return all media required to render the widgets on this form.

class inyoka.ikhaya.forms.EditPublicArticleForm(*args, **kwargs)
class Meta
exclude = ['updated', 'comment_count', 'slug']
_meta = <django.forms.models.ModelFormOptions object>
base_fields = {'author': <inyoka.utils.forms.UserField object>, 'category': <django.forms.models.ModelChoiceField object>, 'comments_enabled': <django.forms.fields.BooleanField object>, 'icon': <django.forms.models.ModelChoiceField object>, 'intro': <django.forms.fields.CharField object>, 'is_xhtml': <django.forms.fields.BooleanField object>, 'pub_date': <django.forms.fields.DateField object>, 'pub_time': <django.forms.fields.TimeField object>, 'public': <django.forms.fields.BooleanField object>, 'subject': <django.forms.fields.CharField object>, 'text': <django.forms.fields.CharField object>, 'updated': <inyoka.utils.forms.DateTimeField object>}
declared_fields = {'author': <inyoka.utils.forms.UserField object>, 'updated': <inyoka.utils.forms.DateTimeField object>}
property media

Return all media required to render the widgets on this form.

class inyoka.ikhaya.forms.NewEventForm(*args, **kwargs)
class Meta
exclude = ['author', 'slug', 'visible']
model

alias of Event

widgets = {'date': <class 'inyoka.utils.forms.DateWidget'>, 'enddate': <class 'inyoka.utils.forms.DateWidget'>, 'endtime': <class 'inyoka.utils.forms.TimeWidget'>, 'time': <class 'inyoka.utils.forms.TimeWidget'>}
_meta = <django.forms.models.ModelFormOptions object>
base_fields = {'date': <django.forms.fields.DateField object>, 'description': <django.forms.fields.CharField object>, 'enddate': <django.forms.fields.DateField object>, 'endtime': <django.forms.fields.TimeField object>, 'location': <django.forms.fields.CharField object>, 'location_lat': <django.forms.fields.FloatField object>, 'location_long': <django.forms.fields.FloatField object>, 'location_town': <django.forms.fields.CharField object>, 'name': <django.forms.fields.CharField object>, 'time': <django.forms.fields.TimeField object>}
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__’.

declared_fields = {}
property media

Return all media required to render the widgets on this form.

save(user)

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.

class inyoka.ikhaya.forms.SuggestArticleForm(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, instance=None, use_required_attribute=None, renderer=None)
class Meta
fields = ('title', 'intro', 'text', 'notes')
model

alias of Suggestion

widgets = {'intro': <django.forms.widgets.Textarea object>}
_meta = <django.forms.models.ModelFormOptions object>
base_fields = {'intro': <django.forms.fields.CharField object>, 'notes': <django.forms.fields.CharField object>, 'text': <django.forms.fields.CharField object>, 'title': <django.forms.fields.CharField object>}
declared_fields = {}
property media

Return all media required to render the widgets on this form.

save(user, commit=True)

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.