Les événements sans localisation sont ceux qui en ont vraiment besoin
This commit is contained in:
parent
3cdb6cdaf9
commit
cb69ece6ca
@ -649,6 +649,9 @@ class Event(models.Model):
|
||||
def nb_draft_events():
|
||||
return Event.objects.filter(status=Event.STATUS.DRAFT).count()
|
||||
|
||||
def get_qs_events_with_unkwnon_place():
|
||||
return Event.objects.filter(exact_location__isnull=True).filter(~Q(status=Event.STATUS.TRASH)).filter(Q(possibly_duplicated=None)|Q(masked=False))
|
||||
|
||||
def download_image(self):
|
||||
# first download file
|
||||
|
||||
|
@ -78,7 +78,7 @@ def show_badges_events(placement="top"):
|
||||
|
||||
@register.simple_tag
|
||||
def show_badge_unknown_places(placement="top"):
|
||||
nb_unknown = Event.objects.filter(exact_location__isnull=True).count()
|
||||
nb_unknown = Event.get_qs_events_with_unkwnon_place().count()
|
||||
if nb_unknown != 0:
|
||||
return mark_safe(
|
||||
'<a href="'
|
||||
|
@ -1982,7 +1982,7 @@ class UnknownPlacesListView(PermissionRequiredMixin, ListView):
|
||||
paginate_by = 10
|
||||
ordering = ["-pk"]
|
||||
template_name = "agenda_culturel/place_unknown_list.html"
|
||||
queryset = Event.objects.filter(exact_location__isnull=True)
|
||||
queryset = Event.get_qs_events_with_unkwnon_place()
|
||||
|
||||
|
||||
def fix_unknown_places(request):
|
||||
|
Loading…
Reference in New Issue
Block a user