title: django how show detail page in modal
body: <p>I have a problem. I'm a beginner in django and python and I need help.
  I have a page with list of cars and all cars have a button with info. Now, this button redirects me to another page but I want to open this detail view not in a new page but in modal on the same page. I tried many solutions but none of them didn't work in my case.</p>
  <p>This is my page with a list of cars <strong>car_list.html</strong> . It's about <strong>car_detailURL</strong>.</p>
  <pre><code>{% extends 'main/main.html' %}
  {% block title %} Lista samochodów {% endblock %}
  {% load static %}
  
  
  {% block content %}
      {% for carTEMP in cars %}
      &lt;div class=&quot;card bg-light mb-3&quot;&gt;
          &lt;h5 class=&quot;card-header&quot;&gt;
              {{carTEMP}}
          &lt;/h5&gt;
          &lt;div class=&quot;card-body&quot;&gt;
              &lt;img src=&quot;/media/{{carTEMP.car_photo}}&quot;&gt;
              &lt;div class=&quot;row&quot;&gt;
                  &lt;div class=&quot;col-sm-auto&quot;&gt;
                      &lt;p&gt;Data produkcji: {{carTEMP.car_date_of_prod}}&lt;/p&gt;
                      &lt;p&gt;Numer rejestracyjny: {{carTEMP.car_registration_nr}}&lt;/p&gt;
                  &lt;/div&gt;
                  &lt;div class=&quot;col-sm-auto&quot;&gt;
                      &lt;a href=&quot;{% url 'car_detailURL' carTEMP.id %}&quot;&gt;&lt;i class=&quot;fas fa-2x fa-info-circle&quot;&gt;&lt;/i&gt;&lt;/a&gt;
                      &lt;a href=&quot;{% url 'edit_carURL' carTEMP.id %}&quot;&gt;&lt;i class=&quot;fas fa-2x fa-edit&quot;&gt;&lt;/i&gt;&lt;/a&gt;
                      &lt;a href=&quot;{% url 'delete_carURL' carTEMP.id %}&quot;&gt;&lt;i class=&quot;fas fa-2x fa-trash-alt&quot;&gt;&lt;/i&gt;&lt;/a&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      {% endfor %}
      
      {% include &quot;main/pagination.html&quot; with page=cars %}
  {% endblock %}
  </code></pre>
  <p>And this is <strong>car_detail.html</strong> which I want to display in modal.</p>
  <pre><code>{% extends &quot;main/main.html&quot; %}
  {% load static %}
  
  {% block title %}
  Szczególy
  {% endblock %}
  
  {% block content %}
      &lt;p&gt;&lt;strong&gt;Marka:&lt;/strong&gt; {{ car.car_brand }}&lt;/p&gt;
      &lt;p&gt;&lt;strong&gt;Model:&lt;/strong&gt; {{ car.car_model }}&lt;/p&gt;
      &lt;p&gt;&lt;strong&gt;Silnik:&lt;/strong&gt; {{ car.car_engine }}&lt;/p&gt;
      &lt;p&gt;&lt;strong&gt;Rok produkcji:&lt;/strong&gt; {{ car.car_date_of_prod }}&lt;/p&gt;
      &lt;p&gt;&lt;strong&gt;Numer rejestracyjny:&lt;/strong&gt; {{ car.car_registration_nr }}&lt;/p&gt;
  {% endblock %}
  </code></pre>
  <p>And my <strong>views.py</strong> wiht <strong>car_detail view</strong>.</p>
  <pre><code>@login_required
  def car_detail(request, id):
      car = get_object_or_404(Car,
                              id=id,
                              car_available=True)
  
      return render(request, 'cars/car_detail.html',
                    {'car': car})
  </code></pre>
  <p>And urls.py file:</p>
  <pre><code>from django.urls import path, include
  from . import views
  
  
  urlpatterns = [
      path('all/', views.cars_list, name='cars_listURL'),
      path('available/', views.cars_list_available, name='cars_list_availableURL'),
      path('new/', views.new_car, name='new_carURL'),
      path('edit/&lt;int:id&gt;/', views.edit_car, name='edit_carURL'),
      path('delete/&lt;int:id&gt;/', views.delete_car, name='delete_carURL'),
      path('&lt;int:id&gt;/', views.car_detail, name='car_detailURL')
  ]
  </code></pre>
  <p>I don't need ready-made solutions. Carrot will be fine too. I need advice in which direction I must go</p>