news.forms module

class news.forms.NewsLetterForm(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)[source]

Bases: django.forms.models.ModelForm

class Meta[source]

Bases: object

model

alias of news.models.NewsLetter

fields = ['date', 'intro', 'closing', 'published']
base_fields = {'closing': <django.forms.fields.CharField object>, 'date': <django.forms.fields.DateField object>, 'intro': <django.forms.fields.CharField object>, 'published': <django.forms.fields.BooleanField object>}
declared_fields = {}
property media
class news.forms.NewsItemForm(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)[source]

Bases: django.forms.models.ModelForm

class Meta[source]

Bases: object

model

alias of news.models.NewsItem

fields = ['date', 'headline', 'blurb_short', 'blurb', 'image', 'css_class', 'followup_link', 'followup_link_text', 'published', 'on_homepage']
base_fields = {'blurb': <django.forms.fields.CharField object>, 'blurb_short': <django.forms.fields.CharField object>, 'css_class': <django.forms.fields.CharField object>, 'date': <django.forms.fields.DateField object>, 'followup_link': <django.forms.fields.URLField object>, 'followup_link_text': <django.forms.fields.CharField object>, 'headline': <django.forms.fields.CharField object>, 'image': <django.forms.fields.ImageField object>, 'on_homepage': <django.forms.fields.BooleanField object>, 'published': <django.forms.fields.BooleanField object>}
declared_fields = {}
property media
class news.forms.NewsLetterNewsItemsTableForm(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)[source]

Bases: django.forms.models.ModelForm

class Meta[source]

Bases: object

model

alias of news.models.NewsLetterNewsItemsTable

fields = ['newsitem']
base_fields = {'newsitem': <django.forms.models.ModelChoiceField object>}
declared_fields = {}
property media
class news.forms.NewsLetterNewsItemsTableFormSet(data=None, files=None, auto_id='id_%s', prefix=None, queryset=None, *, initial=None, **kwargs)[source]

Bases: django.forms.models.BaseModelFormSet

save(*args, **kwargs)[source]

Save model instances for every form, adding and changing instances as necessary, and return the list of instances.