On ne montre que les événements publics aux utilisateurs non connectés
This commit is contained in:
parent
3001685937
commit
b0b653c1b1
@ -1677,7 +1677,7 @@ class PlaceDetailView(ListView):
|
||||
|
||||
def get_queryset(self):
|
||||
self.place = get_object_or_404(Place, pk=self.kwargs["pk"])
|
||||
return Event.objects.filter(exact_location=self.place).filter(
|
||||
return get_event_qs(self.request).filter(exact_location=self.place).filter(
|
||||
Q(other_versions__isnull=True) |
|
||||
Q(other_versions__representative=F('pk')) |
|
||||
Q(other_versions__representative__isnull=True)).filter(start_day__gte=datetime.now()).order_by("start_day")
|
||||
@ -1693,7 +1693,7 @@ class PlaceDetailViewPast(PlaceDetailView):
|
||||
def get_queryset(self):
|
||||
self.place = get_object_or_404(Place, pk=self.kwargs["pk"])
|
||||
self.past = True
|
||||
return Event.objects.filter(exact_location=self.place).filter(
|
||||
return get_event_qs(self.request).filter(exact_location=self.place).filter(
|
||||
Q(other_versions__isnull=True) |
|
||||
Q(other_versions__representative=F('pk')) |
|
||||
Q(other_versions__representative__isnull=True)).filter(start_day__lte=datetime.now()).order_by("-start_day")
|
||||
@ -1955,7 +1955,7 @@ class TagDeleteView(PermissionRequiredMixin, DeleteView):
|
||||
def view_tag(request, t):
|
||||
|
||||
paginator = Paginator(
|
||||
Event.objects.filter(tags__contains=[t]).order_by(
|
||||
get_event_qs(request).filter(tags__contains=[t]).order_by(
|
||||
"start_day", "start_time"),
|
||||
10,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user