diff --git a/goodtimes/services.py b/goodtimes/services.py index 8f4f6ca..c340ef9 100644 --- a/goodtimes/services.py +++ b/goodtimes/services.py @@ -410,6 +410,7 @@ class EventFilterService: Q(title__icontains=search_query) | Q(key_guest__icontains=search_query) | Q(venue__address__icontains=search_query) + | Q(tags__name__icontains=search_query) ) print("filtered_events: ", filtered_events) @@ -432,19 +433,20 @@ class EventFilterService: active=True, draft=False, created_by__is_active=True, + tags__name__icontains=search_query ) - filtered_events = ( - filtered_events.annotate( - matched_tags=Count( - "tags", - filter=Q(tags__name__icontains=search_query), - distinct=True, - ) - ) - .filter(matched_tags__gt=0) - .distinct() - ) + # filtered_events = ( + # filtered_events.annotate( + # matched_tags=Count( + # "tags", + # filter=Q(tags__name__icontains=search_query), + # distinct=True, + # ) + # ) + # .filter(matched_tags__gt=0) + # .distinct() + # ) print("filtered_events: ", filtered_events) # Filter for current, future, or ongoing events diff --git a/manage_events/api/views.py b/manage_events/api/views.py index fa773bd..e3b400e 100644 --- a/manage_events/api/views.py +++ b/manage_events/api/views.py @@ -176,10 +176,6 @@ class EventsAPIView(APIView): events = services.EventFilterService.filter_events_by_search( search_query=query ) - elif filter == "tags": - events = services.EventFilterService.filter_events_by_tags( - search_query=query - ) elif filter == "category" and category_id is not None: events = services.EventFilterService.filter_events_by_category( int(category_id) diff --git a/templates/manage_communications/feedback_list.html b/templates/manage_communications/feedback_list.html index 5681a58..1562c5f 100644 --- a/templates/manage_communications/feedback_list.html +++ b/templates/manage_communications/feedback_list.html @@ -55,7 +55,7 @@ {{data_obj.id}} {{data_obj.principal}} - {{data_obj.email}} + {{data_obj.principal.email}} {{data_obj.comment}} {% for _ in "x"|ljust:data_obj.rating %} diff --git a/templates/otp/otp.html b/templates/otp/otp.html index 0b5d84b..1b1a880 100644 --- a/templates/otp/otp.html +++ b/templates/otp/otp.html @@ -28,7 +28,7 @@

Hi {{ user.email }},

You requested a one-time password (OTP) to {{ action }}. Here is your OTP:

{{ OTP }}

-

This OTP is valid for 2 minutes. Please do not share it with anyone. If you did not request this OTP, please ignore this email.

+

This OTP is valid for 1 minute. Please do not share it with anyone. If you did not request this OTP, please ignore this email.

Thanks,

Team

Good Times Ltd