Exemple #1
0
 def get_context_data(self, **kwargs):
     if self.request.user.is_authenticated:
         create_action(self.request.user, 'DAILY_VISIT')
     context = TemplateView.get_context_data(self, **kwargs)
     user = self.request.user
     if user.is_authenticated:
         deals = []
         for deal in user.deals:
             deals.append(deal.set_pov(self.request.user))
         context['deals'] = deals
         context['user_feedback_open'] = user.userfeedback_set.filter(
             status=0)
         context['push_feedback_open'] = user.pushfeedback_set.filter(
             status=0)
         context['lobby'] = Chat.get_lobby()
         # context['chat'] = Chat.get_lobby()
     else:
         self.template_name = 'dashboard/dashboard_anonymous.html'
     return context
Exemple #2
0
 def get_context_data(self, **kwargs):
     context = TemplateView.get_context_data(self, **kwargs)
     context['lobby'] = Chat.get_lobby()
     return context
Exemple #3
0
 def get_context_data(self, *args, **kwargs):
     context = ListView.get_context_data(self, *args, **kwargs)
     context['chat'] = Chat.get_lobby()
     return context