profiles.views module¶
-
class
profiles.views.
ProfileAutocompleteView
(**kwargs)[source]¶ Bases:
dal_select2.views.Select2QuerySetView
View to feed the Select2 widget.
-
class
profiles.views.
ProfileCreateView
(**kwargs)[source]¶ Bases:
scipost.mixins.PermissionsMixin
,django.views.generic.edit.CreateView
Formview to create a new Profile.
-
permission_required
= 'scipost.can_create_profiles'¶
-
form_class
¶ alias of
profiles.forms.ProfileForm
-
template_name
= 'profiles/profile_form.html'¶
-
success_url
= '/profiles/'¶
-
-
profiles.views.
profile_match
(request, profile_id, from_type, pk)[source]¶ Links an existing Profile to one of existing Contributor, RefereeInvitation or RegistrationInvitation.
Profile relates to Contributor as OneToOne. Matching is thus only allowed if there are no duplicate objects for these elements.
For matching the Profile to a Contributor, the following preconditions are defined: - the Profile has no association to another Contributor - the Contributor has no association to another Profile If these are not met, no action is taken.
-
class
profiles.views.
ProfileUpdateView
(**kwargs)[source]¶ Bases:
scipost.mixins.PermissionsMixin
,django.views.generic.edit.UpdateView
Formview to update a Profile.
-
permission_required
= 'scipost.can_create_profiles'¶
-
model
¶ alias of
profiles.models.Profile
-
form_class
¶ alias of
profiles.forms.ProfileForm
-
template_name
= 'profiles/profile_form.html'¶
-
success_url
= '/profiles/'¶
-
-
class
profiles.views.
ProfileDeleteView
(**kwargs)[source]¶ Bases:
scipost.mixins.PermissionsMixin
,django.views.generic.edit.DeleteView
Delete a Profile.
-
permission_required
= 'scipost.can_create_profiles'¶
-
model
¶ alias of
profiles.models.Profile
-
success_url
= '/profiles/'¶
-
-
class
profiles.views.
ProfileDetailView
(**kwargs)[source]¶ Bases:
scipost.mixins.PermissionsMixin
,django.views.generic.detail.DetailView
-
permission_required
= 'scipost.can_view_profiles'¶
-
model
¶ alias of
profiles.models.Profile
-
-
class
profiles.views.
ProfileListView
(**kwargs)[source]¶ Bases:
scipost.mixins.PermissionsMixin
,scipost.mixins.PaginationMixin
,django.views.generic.list.ListView
List Profile object instances.
-
permission_required
= 'scipost.can_view_profiles'¶
-
model
¶ alias of
profiles.models.Profile
-
paginate_by
= 25¶
-
-
class
profiles.views.
ProfileDuplicateListView
(**kwargs)[source]¶ Bases:
scipost.mixins.PermissionsMixin
,scipost.mixins.PaginationMixin
,django.views.generic.list.ListView
List Profiles with potential duplicates; allow to merge if necessary.
-
permission_required
= 'scipost.can_create_profiles'¶
-
model
¶ alias of
profiles.models.Profile
-
template_name
= 'profiles/profile_duplicate_list.html'¶
-
paginate_by
= 16¶
-
-
profiles.views.
email_make_primary
(request, email_id)[source]¶ Make this email the primary one for this Profile.
-
profiles.views.
toggle_email_status
(request, email_id)[source]¶ Toggle valid/deprecated status of ProfileEmail.
-
class
profiles.views.
AffiliationCreateView
(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.UserPassesTestMixin
,django.views.generic.edit.CreateView
-
model
¶ alias of
profiles.models.Affiliation
-
form_class
¶ alias of
profiles.forms.AffiliationForm
-
template_name
= 'profiles/affiliation_form.html'¶
-
-
class
profiles.views.
AffiliationUpdateView
(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.UserPassesTestMixin
,django.views.generic.edit.UpdateView
-
model
¶ alias of
profiles.models.Affiliation
-
form_class
¶ alias of
profiles.forms.AffiliationForm
-
template_name
= 'profiles/affiliation_form.html'¶
-
-
class
profiles.views.
AffiliationDeleteView
(**kwargs)[source]¶ Bases:
django.contrib.auth.mixins.UserPassesTestMixin
,django.views.generic.edit.DeleteView
-
model
¶ alias of
profiles.models.Affiliation
-