The ManyToManyField created for Contact, can be displayed on the webpage that are mapped with the particular workshop.
To do this, the event/workshop_detail.html
template should be edited as follows :
{% with workshop.contacts.all as contacts %}
{% if contacts %}
<h2 class="text-3xl text-orange-500 font-semibold mb-4 text-center mt-2">Contact</h2>
{% endif %}
<div class="bg-gray-700 p-6 mb-6 rounded-lg">
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<div class="mb-4 lg:col-span-1">
<h3 class="text-xl font-semibold mb-2">Email</h3>
<p class="text-gray-200">{{ workshop.mail_id }}</p>
</div>
<div class="mb-4">
<div class="grid grid-cols-1 md:lg:grid-cols-2 gap-4 justify">
{% for contact in contacts %}
<div>
<h3 class="text-xl font-semibold mb-2">{{ contact.name }}<br>({{ contact.get_designation_display }})</h3>
<p class="text-gray-200">{{ contact.number }}</p>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
{% endwith %}
After adding this, it will also display a contact section in the webpage. The section can be further extended with better styling or responsiveness. As part of this course, we will continue to add further details that would be nice if it is there before the registration.