def post(self, request, *args, **kwargs): current_userprofile = request.user.userprofile (application_type, has_applied, application_status, error) = get_application_status(current_userprofile) self.context['application_type'] = application_type self.context['has_applied'] = has_applied self.context['application_status'] = application_status self.context['error'] = error return render(request, self.template_name, self.context)
def get(self, request, *args, **kwargs): # Status of application remains 0 until both # supervisor and hod approve the application current_userprofile = request.user.userprofile (application_type, has_applied, application_status, error) = get_application_status(current_userprofile) self.context['application_type'] = application_type self.context['has_applied'] = has_applied self.context['application_status'] = application_status self.context['error'] = error return render(request, self.template_name, self.context)
def post(self, request, *args, **kwargs): current_userprofile = request.user.userprofile (application_type, has_applied, application_status, error) = get_application_status(current_userprofile) deadline_status_ps2ts = get_deadline_status(TransferType.PS2TS.value) deadline_status_ts2ps = get_deadline_status(TransferType.TS2PS.value) self.context['application_type'] = application_type self.context['has_applied'] = has_applied self.context['application_status'] = application_status self.context['error'] = error self.context[ 'deadline_status_ps2ts'] = 1 if deadline_status_ps2ts else 0 self.context[ 'deadline_status_ts2ps'] = 1 if deadline_status_ts2ps else 0 return render(request, self.template_name, self.context)
def get(self, request, *args, **kwargs): # Status of application remains 0 until both # supervisor and hod approve the application current_userprofile = request.user.userprofile (application_type, has_applied, application_status, error) = get_application_status(current_userprofile) (comments_from_hod, comments_from_supervisor, comments_from_ad) = get_authority_comments(current_userprofile) # for testing purposes deadline_status_ps2ts = get_deadline_status(TransferType.PS2TS.value) deadline_status_ts2ps = get_deadline_status(TransferType.TS2PS.value) self.context['application_type'] = application_type self.context['has_applied'] = has_applied self.context['application_status'] = application_status self.context['error'] = error self.context['comments_from_hod'] = comments_from_hod self.context['comments_from_supervisor'] = comments_from_supervisor self.context['comments_from_ad'] = comments_from_ad self.context[ 'deadline_status_ps2ts'] = 1 if deadline_status_ps2ts else 0 self.context[ 'deadline_status_ts2ps'] = 1 if deadline_status_ts2ps else 0 return render(request, self.template_name, self.context)