organizations.views module¶
-
class
organizations.views.
OrganizationAutocompleteView
(**kwargs)[source]¶ Bases:
dal_select2.views.Select2QuerySetView
View to feed the Select2 widget.
Flags of the organizations are displayed in the selection list; the stylesheet flags/sprite-hq.css from app django-countries must be accessible on the page for the flag to be displayed properly; we include it centrally in static and put this in the page head:
<link rel="stylesheet" href="{% static 'flags/sprite-hq.css' %}">
The data-html attribute has to be set to True on all widgets, e.g.
organization = forms.ModelChoiceField( queryset=Organization.objects.all(), widget=autocomplete.ModelSelect2( url='/organizations/organization-autocomplete', attrs={'data-html': True} ) )
-
class
organizations.views.
OrganizationCreateView
(**kwargs)[source]¶ Bases:
scipost.mixins.PermissionsMixin
,django.views.generic.edit.CreateView
Create a new Organization.
-
permission_required
= 'scipost.can_manage_organizations'¶
-
form_class
¶ alias of
organizations.forms.OrganizationForm
-
template_name
= 'organizations/organization_create.html'¶
-
success_url
= '/organizations/'¶
-
-
class
organizations.views.
OrganizationUpdateView
(**kwargs)[source]¶ Bases:
scipost.mixins.PermissionsMixin
,django.views.generic.edit.UpdateView
Update an Organization.
-
permission_required
= 'scipost.can_manage_organizations'¶
-
model
¶ alias of
organizations.models.Organization
-
form_class
¶ alias of
organizations.forms.OrganizationForm
-
template_name
= 'organizations/organization_update.html'¶
-
success_url
= '/organizations/'¶
-
-
class
organizations.views.
OrganizationDeleteView
(**kwargs)[source]¶ Bases:
scipost.mixins.PermissionsMixin
,django.views.generic.edit.DeleteView
Delete an Organization.
-
permission_required
= 'scipost.can_manage_organizations'¶
-
model
¶ alias of
organizations.models.Organization
-
success_url
= '/organizations/'¶
-
-
class
organizations.views.
OrganizationListView
(**kwargs)[source]¶ Bases:
scipost.mixins.PaginationMixin
,django.views.generic.list.ListView
-
model
¶ alias of
organizations.models.Organization
-
paginate_by
= 50¶
-
-
class
organizations.views.
OrganizationDetailView
(**kwargs)[source]¶ Bases:
django.views.generic.detail.DetailView
-
model
¶ alias of
organizations.models.Organization
-
-
class
organizations.views.
OrganizationEventCreateView
(**kwargs)[source]¶ Bases:
scipost.mixins.PermissionsMixin
,django.views.generic.edit.CreateView
-
permission_required
= 'scipost.can_manage_organizations'¶
-
model
¶
-
form_class
¶
-
template_name
= 'organizations/organizationevent_form.html'¶
-
-
class
organizations.views.
OrganizationEventListView
(**kwargs)[source]¶ Bases:
scipost.mixins.PermissionsMixin
,scipost.mixins.PaginationMixin
,django.views.generic.list.ListView
-
permission_required
= 'scipost.can_manage_organizations'¶
-
model
¶
-
paginate_by
= 10¶
-
-
class
organizations.views.
ContactPersonCreateView
(**kwargs)[source]¶ Bases:
scipost.mixins.PermissionsMixin
,django.views.generic.edit.CreateView
-
permission_required
= 'scipost.can_add_contactperson'¶
-
model
¶ alias of
organizations.models.ContactPerson
-
form_class
¶
-
template_name
= 'organizations/contactperson_form.html'¶
-
-
class
organizations.views.
ContactPersonUpdateView
(**kwargs)[source]¶ Bases:
scipost.mixins.PermissionsMixin
,django.views.generic.edit.UpdateView
-
permission_required
= 'scipost.can_add_contactperson'¶
-
model
¶ alias of
organizations.models.ContactPerson
-
form_class
¶
-
template_name
= 'organizations/contactperson_form.html'¶
-
-
class
organizations.views.
ContactPersonDeleteView
(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.UserPassesTestMixin
,django.views.generic.edit.DeleteView
-
model
¶ alias of
organizations.models.ContactPerson
-
-
class
organizations.views.
ContactPersonListView
(**kwargs)[source]¶ Bases:
scipost.mixins.PermissionsMixin
,django.views.generic.list.ListView
-
permission_required
= 'scipost.can_add_contactperson'¶
-
model
¶ alias of
organizations.models.ContactPerson
-
-
organizations.views.
organization_add_contact
(request, organization_id, contactperson_id=None)[source]¶
-
organizations.views.
dashboard
(request)[source]¶ Administration page for Organization Contacts.
This page is meant as a personal page for Contacts, where they will for example be able to read their personal data and agreements.
-
class
organizations.views.
ContactDetailView
(**kwargs)[source]¶ Bases:
scipost.mixins.PermissionsMixin
,django.views.generic.detail.DetailView
View details of a Contact. Accessible to Admin.
-
permission_required
= 'scipost.can_manage_organizations'¶
-
model
¶ alias of
organizations.models.Contact
-
-
class
organizations.views.
ContactRoleUpdateView
(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.UserPassesTestMixin
,django.views.generic.edit.UpdateView
Update a ContactRole.
-
model
¶ alias of
organizations.models.ContactRole
-
form_class
¶ alias of
organizations.forms.ContactRoleForm
-
template_name
= 'organizations/contactrole_form.html'¶
-
-
class
organizations.views.
ContactRoleDeleteView
(**kwargs)[source]¶ Bases:
scipost.mixins.PermissionsMixin
,django.views.generic.edit.DeleteView
Delete a ContactRole.
-
permission_required
= 'scipost.can_manage_organizations'¶
-
model
¶ alias of
organizations.models.ContactRole
-