
from .models import Album

from django.shortcuts import render,get_object_or_404


def index(request):
    all_albums=Album.objects.all()

    return render(request,'music/index.html',{'all_albums':all_albums})
    

def detail(request,album_id):
    album=get_object_or_404(Album,pk=album_id)
    return render(request, 'music/detail.html',{'album':album})


    

