finances.views module

finances.views.publishing_years()[source]
finances.views.total_subsidies_in_year(year)[source]
finances.views.publishing_expenditures()[source]
finances.views.recent_publishing_expenditures(months=6)[source]

Tally of total publishing expenditures over last months number of months.

finances.views.finances(request)[source]
finances.views.apex(request)[source]
finances.views.country_level_data(request)[source]
class finances.views.SubsidyCreateView(**kwargs)[source]

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

Create a new Subsidy.

permission_required = 'scipost.can_manage_subsidies'
model

alias of finances.models.Subsidy

form_class

alias of finances.forms.SubsidyForm

template_name = 'finances/subsidy_form.html'
get_success_url()[source]

Return the URL to redirect to after processing a valid form.

class finances.views.SubsidyUpdateView(**kwargs)[source]

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

Update a Subsidy.

permission_required = 'scipost.can_manage_subsidies'
model

alias of finances.models.Subsidy

form_class

alias of finances.forms.SubsidyForm

template_name = 'finances/subsidy_form.html'
get_success_url()[source]

Return the URL to redirect to after processing a valid form.

class finances.views.SubsidyDeleteView(**kwargs)[source]

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

Delete a Subsidy.

permission_required = 'scipost.can_manage_subsidies'
model

alias of finances.models.Subsidy

success_url = '/finances/subsidies/'
class finances.views.SubsidyListView(**kwargs)[source]

Bases: django.views.generic.list.ListView

model

alias of finances.models.Subsidy

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.

class finances.views.SubsidyDetailView(**kwargs)[source]

Bases: django.views.generic.detail.DetailView

model

alias of finances.models.Subsidy

finances.views.subsidy_toggle_amount_public_visibility(request, subsidy_id)[source]

Method to toggle the public visibility of the amount of a Subsidy. Callable by Admin and Contacts for the relevant Organization.

class finances.views.SubsidyAttachmentCreateView(**kwargs)[source]

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

Create a new SubsidyAttachment.

permission_required = 'scipost.can_manage_subsidies'
model

alias of finances.models.SubsidyAttachment

form_class

alias of finances.forms.SubsidyAttachmentForm

template_name = 'finances/subsidyattachment_form.html'
get_context_data(*args, **kwargs)[source]

Insert the form into the context dict.

get_initial()[source]

Return the initial data to use for forms on this view.

get_success_url()[source]

Return the URL to redirect to after processing a valid form.

class finances.views.SubsidyAttachmentUpdateView(**kwargs)[source]

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

Update a SubsidyAttachment.

permission_required = 'scipost.can_manage_subsidies'
model

alias of finances.models.SubsidyAttachment

form_class

alias of finances.forms.SubsidyAttachmentForm

template_name = 'finances/subsidyattachment_form.html'
success_url = '/finances/subsidies/'
get_context_data(*args, **kwargs)[source]

Insert the form into the context dict.

get_success_url()[source]

Return the URL to redirect to after processing a valid form.

class finances.views.SubsidyAttachmentDeleteView(**kwargs)[source]

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

Delete a SubsidyAttachment.

permission_required = 'scipost.can_manage_subsidies'
model

alias of finances.models.SubsidyAttachment

get_success_url()[source]
finances.views.subsidy_attachment_toggle_public_visibility(request, attachment_id)[source]

Method to toggle the public visibility of an attachment to a Subsidy. Callable by Admin and Contacts for the relevant Organization.

finances.views.subsidy_attachment(request, subsidy_id, attachment_id)[source]
finances.views.timesheets(request)[source]

Overview of all timesheets including comments and related objects.

finances.views.timesheets_detailed(request)[source]

Overview of all timesheets.

class finances.views.LogDeleteView(**kwargs)[source]

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.edit.DeleteView

model

alias of finances.models.WorkLog

get_object()[source]

Return the object the view is displaying.

Require self.queryset and a pk or slug argument in the URLconf. Subclasses can override this to return any object.

get_success_url()[source]