submissions.mixins module¶
-
class
submissions.mixins.
FriendlyPermissionMixin
[source]¶ Bases:
django.contrib.auth.mixins.PermissionRequiredMixin
This mixin controls the permissions with a fallback for anonymous users to help them login first. If a logged in user is refused, they will get the http 403 screen anyway.
- Permission_required
The permission code the user should comply with.
-
permission_required
= 'scipost.dummy_permission'¶
-
class
submissions.mixins.
SubmissionMixin
[source]¶ Bases:
object
Provides submission as self.submission for get, post and in context.
-
class
submissions.mixins.
SubmissionAdminViewMixin
[source]¶ Bases:
submissions.mixins.FriendlyPermissionMixin
,submissions.mixins.SubmissionFormViewMixin
This mixin will provide all basic methods and checks required for Submission administration actions regarding Submissions.
- Editorial_page
Submission is element of the set pool() if False, else Submission is element of the subset: editorial_page()
-
editorial_page
= False¶
-
slug_field
= 'preprint__identifier_w_vn_nr'¶
-
slug_url_kwarg
= 'identifier_w_vn_nr'¶
-
property
pool
¶
-
get_queryset
()[source]¶ Return either of two sets of Submissions, with an author filter for the current user.
- This method is used in all Class-Based-Views. However, if one overwrites either one of the
get_object()
get_queryset()
methods, please don’t forget to call super().method_name() to not remove this filter!