Skip to content

Commit

Permalink
pas la colonne supplémentaire ;detail; dans les logs csv
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasBerbesson committed Sep 20, 2024
1 parent 8f4d934 commit cbd6a21
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions orgues/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def render_to_response(self, context, **response_kwargs):
if context["object_list"]:
results = [{"id": u.id, "text": u.nom} for u in context["object_list"]]
return JsonResponse({"results": results, "pagination": {"more": more}})


class FacteursList(TemplateView):
"""
Expand Down Expand Up @@ -347,12 +347,9 @@ class OrgueDetail(DetailView):

def get_object(self, queryset=None):

logger.info("{user};{method};{get_full_path};200".format(user=self.request.user,
logger.info("{user};{method};detail/{get_full_path};200".format(user=self.request.user,
method=self.request.method,
get_full_path=self.request.META.get('HTTP_REFERER')))
logger.info("{user};{method};detail;{get_full_path};200".format(user=self.request.user,
method=self.request.method,
get_full_path=self.kwargs['slug']))
orgue = Orgue.objects.filter(Q(slug=self.kwargs['slug']) | Q(codification=self.kwargs['slug'])).first()
if not orgue:
raise Http404
Expand Down Expand Up @@ -914,7 +911,7 @@ def get_context_data(self, **kwargs):

def get_success_url(self):
return reverse('orgues:evenement-list', args=(self.object.orgue.uuid,))


class EvenementfacteurJS(View):
"""
Expand All @@ -928,7 +925,7 @@ def get(self, request, *args, **kwargs):
results = {}
for evenement in evenements:
data = {"type":evenement.type, "date":evenement.dates, "orgue":OrgueResumeSerializer(evenement.orgue).data}
date = evenement.annee
date = evenement.annee
if date in results.keys():
results[date].append(data)
else:
Expand Down

0 comments on commit cbd6a21

Please sign in to comment.