added email in feedback list view

This commit is contained in:
rizwanisready
2024-04-15 17:04:50 +05:30
parent 3c6dcd6c2c
commit f46ee2b6a9
4 changed files with 15 additions and 17 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -55,7 +55,7 @@
<tr role="row">
<td>{{data_obj.id}}</td>
<td>{{data_obj.principal}}</td>
<td>{{data_obj.email}}</td>
<td>{{data_obj.principal.email}}</td>
<td>{{data_obj.comment}}</td>
<td>{% for _ in "x"|ljust:data_obj.rating %}
<span class="material-symbols-outlined">

View File

@@ -28,7 +28,7 @@
<h1>Hi {{ user.email }},</h1>
<p>You requested a one-time password (OTP) to {{ action }}. Here is your OTP:</p>
<p class="code">{{ OTP }}</p>
<p>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.</p>
<p>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.</p>
<p>Thanks,</p>
<p>Team</p>
<p>Good Times Ltd</p>