Exemple #1
0
 def get_payload(self, site, user, **kwargs):
     state = self.get_user_state()
     data = {
         'facilities': utils.get_facilities(),
         'monthly': utils.detail_stats(site, self.request.user),
         'taggable_contacts': u.get_taggable_contacts('pbf', state, user),
     }
     # Mark all of the reports as viewed by the current user.
     PBFReportVisibility.objects.filter(user=self.request.user).delete()
     return data
Exemple #2
0
 def get_payload(self, site, **kwargs):
     return {
         'facilities': utils.get_facilities(),
         'monthly': utils.detail_stats(site),
     }
Exemple #3
0
 def get_context_data(self, **kwargs):
     context = super(ReportView, self).get_context_data(**kwargs)
     context['facilities'] = json.dumps(utils.get_facilities())
     return context