funders.views module

class funders.views.FunderAutocompleteView(**kwargs)[source]

Bases: dal_select2.views.Select2QuerySetView

View to feed the Select2 widget.

get_queryset()[source]

Filter the queryset with GET[‘q’].

get_result_label(item)[source]

Return the label of a result.

class funders.views.GrantAutocompleteView(**kwargs)[source]

Bases: dal_select2.views.Select2QuerySetView

View to feed the Select2 widget.

get_queryset()[source]

Filter the queryset with GET[‘q’].

get_result_label(item)[source]

Return the label of a result.

funders.views.funders_dashboard(request)[source]

Administration of Funders and Grants.

funders.views.query_crossref_for_funder(request)[source]

Checks Crossref’s Fundref Registry for an entry corresponding to the funder name being looked for. If found, creates a funders.Funder instance.

funders.views.add_funder(request)[source]
funders.views.funders(request)[source]

List page of Funders.

funders.views.funder_publications(request, funder_id)[source]

Detail page of a specific Funder (publicly accessible).

class funders.views.HttpRefererMixin[source]

Bases: object

get_form_kwargs()[source]
form_valid(form)[source]
class funders.views.LinkFunderToOrganizationView(**kwargs)[source]

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

For an existing Funder instance, specify the link to an Organization.

permission_required = 'scipost.can_create_grants'
model

alias of funders.models.Funder

form_class

alias of funders.forms.FunderOrganizationSelectForm

template_name = 'funders/funder_link_organization.html'
success_url = '/funders/dashboard'
form_valid(form)[source]

If the form is valid, save the associated model.

class funders.views.CreateGrantView(**kwargs)[source]

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

Create a Grant in a separate window which may also be used by Production Supervisors.

permission_required = 'scipost.can_create_grants'
model

alias of funders.models.Grant

form_class

alias of funders.forms.GrantForm

success_url = '/funders/dashboard'
dispatch(request, *args, **kwargs)