colleges.views module

class colleges.views.CollegeListView(**kwargs)[source]

Bases: django.views.generic.list.ListView

model

alias of colleges.models.college.College

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

Get the context for this view.

class colleges.views.CollegeDetailView(**kwargs)[source]

Bases: django.views.generic.detail.DetailView

model

alias of colleges.models.college.College

template_name = 'colleges/college_detail.html'
get_object(queryset=None)[source]

Bypass django.views.generic.detail.SingleObjectMixin: since CollegeSlugConverter already found the College as a kwarg, just pass that object on.

class colleges.views.FellowshipAutocompleteView(**kwargs)[source]

Bases: dal_select2.views.Select2QuerySetView

View to feed the Select2 widget.

get_queryset()[source]

Filter the queryset with GET[‘q’].

class colleges.views.FellowshipCreateView(**kwargs)[source]

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

Create a new Fellowship instance for an existing Contributor.

A new Fellowship can be created only for: * an existing Fellow who is renewed * out of an existing PotentialFellowship (elected, or named by Admin)

If the elected/named Fellow does not yet have a Contributor object, this must be set up first.

permission_required = 'scipost.can_manage_college_composition'
form_class

alias of colleges.forms.FellowshipForm

template_name = 'colleges/fellowship_form.html'
get_initial()[source]

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

form_valid(form)[source]

Save the new Fellowship, add College rights and update the status of any PotentialFellowship and FellowshipNomination.

class colleges.views.FellowshipUpdateView(**kwargs)[source]

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

Update an existing Fellowship.

permission_required = 'scipost.can_manage_college_composition'
model

alias of colleges.models.fellowship.Fellowship

form_class

alias of colleges.forms.FellowshipForm

template_name = 'colleges/fellowship_form.html'
class colleges.views.FellowshipDetailView(**kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, django.views.generic.detail.DetailView

permission_required = 'scipost.can_manage_college_composition'
model

alias of colleges.models.fellowship.Fellowship

class colleges.views.FellowshipListView(**kwargs)[source]

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

List Fellowship instances (accessible to College managers).

permission_required = 'scipost.can_manage_college_composition'
model

alias of colleges.models.fellowship.Fellowship

paginate_by = 25
get_queryset()[source]

Return a queryset of Fellowships filtered by optional GET data.

get_context_data(**kwargs)[source]

Get the context for this view.

class colleges.views.FellowshipStartEmailView(*args, **kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, mails.views.MailView

After setting up a new Fellowship, send an info email to the new Fellow.

permission_required = 'scipost.can_manage_college_composition'
mail_code = 'fellows/email_fellow_fellowship_start'
success_url = '/colleges/fellowships'
colleges.views.email_College_Fellows(request, college)[source]

Send an email to all Fellows within a College.

colleges.views.submission_fellowships(request, identifier_w_vn_nr)[source]

List all Fellowships related to Submission.

colleges.views.submission_add_fellowship(request, identifier_w_vn_nr)[source]

Add Fellowship to a Submission’s Fellowship.

colleges.views.fellowship_remove_submission(request, id, identifier_w_vn_nr)[source]

Remove Submission from the Fellowship.

colleges.views.fellowship_add_submission(request, id)[source]

Add Submission to the pool of a Fellowship.

colleges.views.fellowship_remove_proceedings(request, id, proceedings_id)[source]

Remove Proceedings from the pool of a Fellowship.

colleges.views.fellowship_add_proceedings(request, id)[source]

Add Proceedings to the pool of a Fellowship.

class colleges.views.PotentialFellowshipCreateView(**kwargs)[source]

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

Formview to create a new Potential Fellowship.

permission_required = 'scipost.can_add_potentialfellowship'
form_class

alias of colleges.forms.PotentialFellowshipForm

template_name = 'colleges/potentialfellowship_form.html'
success_url = '/colleges/potentialfellowships'
class colleges.views.PotentialFellowshipUpdateView(**kwargs)[source]

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

Formview to update a Potential Fellowship.

permission_required = 'scipost.can_manage_college_composition'
model

alias of colleges.models.potential_fellowship.PotentialFellowship

form_class

alias of colleges.forms.PotentialFellowshipForm

template_name = 'colleges/potentialfellowship_form.html'
success_url = '/colleges/potentialfellowships'
class colleges.views.PotentialFellowshipUpdateStatusView(**kwargs)[source]

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

Formview to update the status of a Potential Fellowship.

permission_required = 'scipost.can_manage_college_composition'
model

alias of colleges.models.potential_fellowship.PotentialFellowship

fields = ['status']
success_url = '/colleges/potentialfellowships'
form_valid(form)[source]

If the form is valid, save the associated model.

class colleges.views.PotentialFellowshipDeleteView(**kwargs)[source]

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

Delete a Potential Fellowship.

permission_required = 'scipost.can_manage_college_composition'
model

alias of colleges.models.potential_fellowship.PotentialFellowship

success_url = '/colleges/potentialfellowships'
class colleges.views.PotentialFellowshipListView(**kwargs)[source]

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

List the PotentialFellowship object instances.

permission_required = 'scipost.can_view_potentialfellowship_list'
model

alias of colleges.models.potential_fellowship.PotentialFellowship

paginate_by = 25
get_queryset()[source]

Return a queryset of PotentialFellowships using optional GET data.

get_context_data(**kwargs)[source]

Get the context for this view.

class colleges.views.PotentialFellowshipDetailView(**kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, django.views.generic.detail.DetailView

permission_required = 'scipost.can_view_potentialfellowship_list'
model

alias of colleges.models.potential_fellowship.PotentialFellowship

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

Insert the single object into the context dict.

colleges.views.vote_on_potential_fellowship(request, potfel_id, vote)[source]
class colleges.views.PotentialFellowshipInitialEmailView(*args, **kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, mails.views.MailView

Send a templated email to a Potential Fellow.

permission_required = 'scipost.can_manage_college_composition'
mail_code = 'potentialfellowships/invite_potential_fellow_initial'
success_url = '/colleges/potentialfellowships'
form_valid(form)[source]

Create an event associated to this outgoing email.

class colleges.views.PotentialFellowshipEventCreateView(**kwargs)[source]

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

Add an event for a Potential Fellowship.

permission_required = 'scipost.can_manage_college_composition'
form_class

alias of colleges.forms.PotentialFellowshipEventForm

success_url = '/colleges/potentialfellowships'
form_valid(form)[source]

If the form is valid, save the associated model.

colleges.views.nominations(request)[source]

List Nominations.

class colleges.views.FellowshipInvitationEmailInitialView(*args, **kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, mails.views.MailView

Send a templated email to an elected nominee.

permission_required = 'scipost.can_manage_college_composition'
mail_code = 'fellowship_nominees/fellowship_invitation_initial'
success_url = '/colleges/nominations'
form_valid(form)[source]

Create an event associated to this outgoing email.