{% extends 'base.html' %} {% load static %} {% block content %}

We have found {{ appointment.count }} doctor/s.

{% for apt in appointment %}
{% if request.user.is_authenticated and request.user.role == 'patient' %}
{{ apt.full_name }}

{{ apt.department }} Expert

{{ apt.qualification_name }}, {{ apt.institute_name }}

Available {{ apt.start_time }} to {{ apt.end_time }} in {{ apt.hospital_name }}

AT {{ apt.location }} Take Appointment

{% elif request.user.is_authenticated and request.user.role == 'doctor' %}
{{ apt.full_name }}

{{ apt.department }} Expert

{{ apt.qualification_name }}, {{ apt.institute_name }}

Available {{ apt.start_time }} to {{ apt.end_time }} in {{ apt.hospital_name }}

AT {{ apt.location }}

{% else %}
{{ apt.full_name }}

{{ apt.department }} Expert

{{ apt.qualification_name }}, {{ apt.institute_name }}

Available {{ apt.start_time }} to {{ apt.end_time }} in {{ apt.hospital_name }}

AT {{ apt.location }}

{% endif %}
{% endfor %}
{% endblock %}