Ejemplo n.º 1
0
 def get_context_data(self, *, object_list=None, **kwargs):
     context = super().get_context_data(**kwargs)
     user = Student.objects.filter(id=self.kwargs['pk']).first()
     followers = user.profile.follower.all()
     context['followers_list'] = followers
     get_college_ranking(context)
     get_student_ranking(context)
     return context
Ejemplo n.º 2
0
 def get_context_data(self, **kwargs):
     data = super().get_context_data(**kwargs)
     p_form = ProfileUpdateForm(instance=self.request.user.profile)
     data['relevant_post'] = None
     data['p_form'] = p_form
     get_college_ranking(data)
     get_student_ranking(data)
     return data
Ejemplo n.º 3
0
 def get_context_data(self, *args, **kwargs):
     context = super().get_context_data(**kwargs)
     following = self.get_object().profile.following.all()
     followers = self.get_object().profile.follower.all()
     context['following'] = following
     context['followers'] = followers
     get_college_ranking(context)
     get_student_ranking(context)
     return context
Ejemplo n.º 4
0
 def get_context_data(self, **kwargs):
     context = super().get_context_data(**kwargs)
     context['registration_form'] = UserRegisterForm()
     get_college_ranking(context)
     get_student_ranking(context)
     return context