Pastebin Forms

inyoka.pastebin.forms

“Add new paste” formular.

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

license:

BSD, see LICENSE for more details.

class inyoka.pastebin.forms.AddPasteForm(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', 'lang', 'code')
model

alias of Entry

_meta = <django.forms.models.ModelFormOptions object>
base_fields = {'code': <django.forms.fields.CharField object>, 'lang': <django.forms.fields.ChoiceField object>, 'title': <django.forms.fields.CharField object>}
declared_fields = {'lang': <django.forms.fields.ChoiceField object>, 'title': <django.forms.fields.CharField object>}
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.