this is my views
def get_user_data(request):
    user_profile = User_Profile.objects.filter(user=request.user)
    user_tender_permission = User_TenderPermission.objects.get(user=request.user)
    user_contract_permission = User_ContractPermission.objects.filter(user__in=user_profile)
    user_project_permission = User_ProjectPermission.objects.get(user=request.user)
    employee_profile = Employee_Profile.objects.get(user=request.user)
    user_OrgstructurePermission = User_OrgstructurePermission.objects.get(user=request.user)
    return {
        'user_tender_permission': user_tender_permission,
        'user_contract_permission': user_contract_permission,
        'user_project_permission': user_project_permission,
        'user_profile': user_profile,
        'user_OrgstructurePermission': user_OrgstructurePermission,
        'employee_profile': employee_profile,
    }  
and this is my html 
                                {% for profile in user_profile %}
                                {% for contract_permission in profile.user_contract_permission.all %}
                                {% if user_contract_permission.contract_app == 'Yes' %}
                                    <div class="col-xxl-2 col-xl-3 col-lg-3 mb-lg-0 col-md-6 mb-3">
                                        {% if notification_count > 0 %}
                                        <a href="{% url 'contract_notification' %}">
                                        {% else %}
                                            {% if user_contract_permission.main_index == 'Yes' %}
                                                <a href="{% url 'contract_main_index' %}">

                                            {% endif %}

                                            {% if user_contract_permission.project_index == 'Yes' %}
                                                <a href="{% url 'contract_project_index' %}">
                                            {% endif %}

                                            {% if user_contract_permission.sector_index == 'Yes' %}
                                                <a href="{% url 'contract_sector_index' %}">
                                            {% endif %}

                                            {% if user_contract_permission.Cost_estimation_action_4 == 'Yes' %}
                                                <a href="{% url 'contract_cost_estimation_index' %}">
                                            {% endif %}
                                        {% endif %}
                                                <div class="card">
                                                    <div class="card-body">
                                                        <div class="card-icon mb-4">
                                                            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text">
                                                                <path d="M14 3v4a1 1 0 0 0 1 1h4"></path>
                                                                <path d="M14 3L9 8H5a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2h-7"></path>
                                                                <path d="M9 8L9 15"></path>
                                                                <path d="M12 8L12 15"></path>
                                                                <path d="M15 8L15 15"></path>
                                                              </svg>
                                                        </div>
                                                        <h5 class="card-title mb-0" style="font-size: 120%; font-weight:1000; font-family: 'Cairo', sans-serif;">العقود <br>CONTRACTS

                                                        </h5>
                                                    </div>
                                                </div>
                                            </a>

                                    </div>

                                {% endif %}
                                {% endfor %}
                                {% endfor %}
but for loop in html not working