def study_stats(request): # TODO: rework templates render_dict = get_report_student_stats(request.user) students_query = User.objects.filter( groups__name__contains=UserGroups.student.value) render_dict.update(get_students_markup(students_query)) return render(request, 'bank/study_stats.html', render_dict)
def students(request): students_data = User.objects.filter(groups__name__contains=UserGroups.student.value).order_by('account__party', 'last_name') render_dict = get_students_markup(students_data) render_dict.update({'students': students_data}) render_dict.update({'can_see_balance': request.user.has_perm( get_perm_name(Actions.see.value, UserGroups.student.value, 'balance'))}) return render(request, 'bank/user_lists/students.html', render_dict)
def get_render_map_update(cls): result = super(TableTransactionController, TableTransactionController).get_render_map_update() students_query = User.objects.filter( groups__name__contains=UserGroups.student.value) result.update(get_students_markup(students_query)) if cls.value_show_name: result.update({'value_show_name': cls.value_show_name}) if cls.header: result.update({'header': cls.header}) return result