Mentorship¶
Mentorship views.
- class MentorshipView(**kwargs)¶
Bases:
CheckObjectOwnershipMixin
,DetailView
Mentorship profile view.
- get_context_data(**kwargs: object) dict[str, object] ¶
Add data to context.
- class AddWordByMentorToStudentViewRedirect(**kwargs)¶
Bases:
RedirectView
Redirect with added data in session view.
- url = '/foreign/mentor-adds-words-for-student-study'¶
Url to redirect.
- get(request: HttpRequest, *args: object, **kwargs: object) HttpResponseBase ¶
Add student id to session.
- redirect_to_mentorship_profile(request: HttpRequest) HttpResponseRedirect ¶
Redirect to profile page.
- class InputMentorView(**kwargs)¶
Bases:
CheckLoginPermissionMixin
,TemplateView
Add mentor view.
- class AddExerciseDataView(**kwargs)¶
Bases:
TemplateView
Add data for student study view.
- get(request: HttpRequest, *args: object, **kwargs: object) HttpResponse ¶
Add student id to session.
- send_mentorship_request(request: HttpRequest, **kwargs: object) HttpResponse ¶
Send request to create a mentorship view.
- accept_mentorship_request(request: HttpRequest, request_pk: int) HttpResponse ¶
Accept mentorship view.
- class DeleteMentorshipRequestView(*args, **kwargs)¶
Bases:
DeleteWithProfileRedirectView
Delete mentorship request by mentor view.
- model¶
alias of
MentorshipRequest
- success_message = 'Запрос удален'¶
Success action message text (str).
- check_permission() bool ¶
Check mentor permission.
- class DeleteMentorshipView(*args, **kwargs)¶
Bases:
DeleteWithProfileRedirectView
Delete mentorship by student view.
- model¶
alias of
Mentorship
- success_message = 'Наставничество удалено'¶
Success action message text (str).
- check_permission() bool ¶
Check mentor permission.