Advertisement
urasayanoglu

my_loans.html

Dec 23rd, 2022
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.00 KB | Source Code | 0 0
  1. {% extends "board_game_club_apps/base.html" %}
  2. {% load bootstrap4 %}
  3.  
  4. {% block page_header %}
  5.   <h1>My Loans</h1>
  6. {% endblock page_header %}
  7.  
  8. {% block content %}
  9.   <ul>
  10.     {% for loan in loans %}
  11.       <div class="card mb-3">
  12.         <h5 class="card-header">
  13.           Game Loned: {{ loan.game_loaned }} <br>
  14.           Loan Date: {{ loan.loan_date|date:'d-m-Y D H:i'  }} <br>
  15.           Return Date: {{ loan.return_time|date:'d-m-Y D H:i' }}
  16.           <form action="{% url 'board_game_club_apps:return_loan' loan.id %}" method="post" class="form">
  17.             {% csrf_token %}
  18.             {% bootstrap_form form %}
  19.             {% bootstrap_form_errors form type='non_fields' %}
  20.             {% buttons %}
  21.               <button name="submit" class="btn btn-primary">Return Game</button>
  22.             {% endbuttons %}
  23.           </form>
  24.         </h5>
  25.       </div>
  26.     {% empty %}
  27.       <li><h5>Unfortunately, there is not any loaned game.</h5></li>
  28.     {% endfor %}
  29.   </ul>
  30. {% endblock content %}
Tags: django
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement