news.views module

class news.views.NewsManageView(**kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, django.views.generic.base.TemplateView

General management of News.

permission_required = 'scipost.can_manage_news'
template_name = 'news/news_manage.html'
get_context_data(**kwargs)[source]
class news.views.NewsLetterView(**kwargs)[source]

Bases: django.views.generic.base.TemplateView

Newsletter, for public consumption online.

template_name = 'news/newsletter_detail.html'
get_context_data(**kwargs)[source]
class news.views.NewsLetterCreateView(**kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, django.views.generic.edit.CreateView

Create a NewsLetter.

permission_required = 'scipost.can_manage_news'
form_class

alias of news.forms.NewsLetterForm

template_name = 'news/newsletter_create.html'
success_url = '/news/manage/'
class news.views.NewsLetterUpdateView(**kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, django.views.generic.edit.UpdateView

Update a NewsLetter.

permission_required = 'scipost.can_manage_news'
model

alias of news.models.NewsLetter

form_class

alias of news.forms.NewsLetterForm

template_name = 'news/newsletter_update.html'
success_url = '/news/'
news.views.newsletter_update_ordering(request, pk)[source]
class news.views.NewsLetterDeleteView(**kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, django.views.generic.edit.DeleteView

Delete a NewsLetter.

permission_required = 'scipost.can_manage_news'
model

alias of news.models.NewsLetter

success_url = '/news/'
class news.views.NewsItemCreateView(**kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, django.views.generic.edit.CreateView

Create a NewsItem.

permission_required = 'scipost.can_manage_news'
form_class

alias of news.forms.NewsItemForm

template_name = 'news/newsitem_create.html'
success_url = '/news/'
class news.views.NewsItemDetailView(**kwargs)[source]

Bases: django.views.generic.detail.DetailView

model

alias of news.models.NewsItem

class news.views.NewsItemUpdateView(**kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, django.views.generic.edit.UpdateView

Update a NewsItem.

permission_required = 'scipost.can_manage_news'
model

alias of news.models.NewsItem

form_class

alias of news.forms.NewsItemForm

template_name = 'news/newsitem_update.html'
success_url = '/news/'
class news.views.NewsItemDeleteView(**kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, django.views.generic.edit.DeleteView

Delete a NewsItem.

permission_required = 'scipost.can_manage_news'
model

alias of news.models.NewsItem

success_url = '/news/'
class news.views.NewsLetterNewsItemsTableCreateView(**kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, django.views.generic.edit.CreateView

Add a NewsItem to a NewsLetter.

permission_required = 'scipost.can_manage_news'
form_class

alias of news.forms.NewsLetterNewsItemsTableForm

success_url = '/news/manage/'
form_valid(form)[source]

If the form is valid, save the associated model.

class news.views.NewsListView(**kwargs)[source]

Bases: django.views.generic.list.ListView

model

alias of news.models.NewsItem

paginate_by = 10
get_queryset()[source]

Return the list of items for this view.

The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.