示例#1
0
 def get_context_data(self, **kwargs):
     ctx = super().get_context_data(**kwargs)
     ctx['detail_user'].team = return_team_of_user(ctx['detail_user'])
     ctx['detail_user'].position = return_position_of_user(ctx['detail_user'])
     ctx['detail_user'].skill = count_skill_of_user(ctx['detail_user'])
     ctx['list_skill_user'] = return_list_skill_of_user(ctx['detail_user'])
     return ctx
示例#2
0
 def get_context_data(self, **kwargs):
     ctx = super(AdminUserIndex, self).get_context_data(**kwargs)
     for user in ctx['list_user']:
         user.team = return_team_of_user(user)
         user.position = return_position_of_user(user)
         user.skill = count_skill_of_user(user)
     return ctx
示例#3
0
 def get_context_data(self, **kwargs):
     ctx = super().get_context_data(**kwargs)
     ctx['update_user'].team = return_team_of_user(ctx['update_user'])
     ctx['update_user'].position = return_position_of_user(ctx['update_user'])
     # ctx['detail_user'].skill = count_skill_of_user(ctx['detail_user'])
     # ctx['list_skill_user'] = return_list_skill_of_user(ctx['detail_user'])
     ctx['list_team'] = Team.objects.all()
     ctx['list_position'] = Position.objects.all()
     return ctx