<!DOCTYPE html>
{% extends "frist_app/base.html" %}
{% block body_block %}
<h1> List of Album </h1>
<h4> Artist Name : {{ artist_info.first_name }} {{ artist_info.last_name }} </h4>
<h4> Instrument Name : {{ artist_info.instrument }}  </h4>
<h4>Artist Rating : {{ artist_rating.num_stars__avg }}</h4>
<hr>
<a href="{% url 'frist_app:edit_artist' artist_id=artist_info.id %}" class="btn btn-primary btn-sm"> Edit</a>
<table class="table table-bordered">
  <tr>
    <th>Album Name </th>
    <th>Release Date </th>
    <th>Rating </th>
  </tr>
 {% for album in album_list %}
 <tr>
   <td> <a href="{% url 'frist_app:edit_album' album_id=album.id %}">{{ album.name }}</a>  </td>
   <td> {{ album.release_date }} </td>
   <td> {{ album.num_stars }} </td>
 </tr>

 {% endfor %}
</table>

<br>
<a href="{% url 'frist_app:delete_artist' artist_id=artist_info.id %}" onclick="return confirm('Delete Musician?')" class="btn btn-danger btn-sm">Delete</a>

{% endblock %}
