commentaries.views module

commentaries.views.request_commentary(request)[source]
class commentaries.views.RequestCommentary(**kwargs)[source]

Bases: django.views.generic.edit.CreateView

success_url = '/personal_page/'
get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

form_valid(form)[source]

If the form is valid, save the associated model.

dispatch(request, *args, **kwargs)
class commentaries.views.RequestPublishedArticle(**kwargs)[source]

Bases: commentaries.views.RequestCommentary

form_class

alias of commentaries.forms.RequestPublishedArticleForm

template_name = 'commentaries/request_published_article.html'
get_context_data(**kwargs)[source]

Insert the form into the context dict.

class commentaries.views.RequestArxivPreprint(**kwargs)[source]

Bases: commentaries.views.RequestCommentary

form_class

alias of commentaries.forms.RequestArxivPreprintForm

template_name = 'commentaries/request_arxiv_preprint.html'
get_context_data(**kwargs)[source]

Insert the form into the context dict.

commentaries.views.prefill_using_DOI(request)[source]
commentaries.views.prefill_using_arxiv_identifier(request)[source]
commentaries.views.vet_commentary_requests(request, commentary_id=None)[source]

Show the first commentary thats awaiting vetting

commentaries.views.modify_commentary_request(request, commentary_id)[source]

Modify a commentary request after vetting with status ‘modified’.

class commentaries.views.CommentaryListView(**kwargs)[source]

Bases: scipost.mixins.PaginationMixin, django.views.generic.list.ListView

model

alias of commentaries.models.Commentary

form

alias of commentaries.forms.CommentaryListSearchForm

paginate_by = 10
context_object_name = 'commentary_list'
get_queryset()[source]

Perform search form here already to get the right pagination numbers.

get_context_data(**kwargs)[source]

Get the context for this view.

commentaries.views.commentary_detail(request, arxiv_or_DOI_string)[source]
commentaries.views.comment_on_publication(request, doi_label)[source]

This will let authors of an SciPost publication comment on their Publication by automatically creating a Commentary page if not exist already.