Skip to content

Commit

Permalink
mail template and partners url fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhuvnesh Sharma authored and Bhuvnesh Sharma committed Oct 6, 2024
1 parent 0817b29 commit 89f21c2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions backend/djangoindia/bg_tasks/event_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from django.template.loader import render_to_string
from django.utils.html import strip_tags
from django.conf import settings
from django.utils import timezone

from djangoindia.db.models import EventRegistration
from celery import shared_task
Expand All @@ -15,13 +16,12 @@ def format_text(text: str) -> str:
def registration_confirmation_email_task(email, event_id):
try:
registration = EventRegistration.objects.get(email=email, event_id=event_id)

context = {
'first_name': registration.first_name,
'event': {
'name': registration.event.name,
'start_date': registration.event.start_date,
'end_date': registration.event.end_date,
'start_date': timezone.localtime(registration.event.start_date),
'end_date': timezone.localtime(registration.event.end_date),
'event_mode': format_text(registration.event.event_mode),
'venue': registration.event.venue,
'description': registration.event.description,
Expand Down
2 changes: 1 addition & 1 deletion backend/djangoindia/db/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class Meta:
class EventRegistrationAdmin(ImportExportModelAdmin):
list_display = ('event', 'first_name', 'email', 'created_at')
readonly_fields = ('created_at', 'updated_at')
list_filter = ('event',)
list_filter = ('event__name',)
search_fields=['email','event__name','first_name','last_name',]
actions = [send_email_to_selected_users]
resource_class = EventRegistrationResource
Expand Down
6 changes: 3 additions & 3 deletions backend/templates/admin/registration_success.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
background-color: #f4f4f4;
}
.container {
max-width: 600px;
max-width: 90%;
margin: 40px auto;
background-color: #fff;
border-radius: 10px;
Expand Down Expand Up @@ -93,7 +93,7 @@
<div class="container">
<div class="content">
<h2>Hello, {{ first_name }}!</h2>
<p>Thank you for registering for the Django india launch event. We are thrilled to have you join us. Below are the details:</p>
<p>Thank you for registering for the {{event.name}}. We are thrilled to have you join us. Below are the details:</p>
<div class="details">
<p><strong>Event:</strong> {{ event.name }}</p>
{% if event.end_date %}
Expand All @@ -111,7 +111,7 @@ <h2>Hello, {{ first_name }}!</h2>
<p><strong>Venue Map:</strong> <iframe src="{{ event.venue_map_link }}" width="400" height="300" style="border:0; width: 100%;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
{% endif %}
</div>
<p>We look forward to seeing you there! If you have any queries, you can contact us @<a href="mailto:[email protected]" target="_blank">[email protected]</a></p>
<p>We look forward to seeing you there! If you have any queries, you can contact us at <a href="mailto:[email protected]" target="_blank">[email protected]</a></p>
<p>Best regards,<br/>Team Django India</p>
<div class="bottom-section">
<p>Follow us on social media:</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const CommunityPartners: React.FC<CommunityPartnersProps> = ({ partners = [] })
>
{partner?.logo ? (
<Image
src={`/${partner.logo}`}
src={partner.logo}
alt={`${partner?.name || 'Partner'} logo`}
width={120}
height={100}
Expand Down

0 comments on commit 89f21c2

Please sign in to comment.