from django.shortcuts import render
from app_music.models import Album, Track


def home(request):
    ctx = {}
    ctx['album'] = album = Album.objects.first()
    ctx['tracks'] = tracks = Track.objects.filter(album=album)
    ctx['tracks_count'] = len(tracks)
    return render(request, 'home.html', ctx)

1eed3f431b3bbb8666265a0a6225ad590d796f2a
<mask token>

<mask token>


def home(request):
    ctx = {}
    ctx['album'] = album = Album.objects.first()
    ctx['tracks'] = tracks = Track.objects.filter(album=album)
    ctx['tracks_count'] = len(tracks)
    return render(request, 'home.html', ctx)

from django.shortcuts import render
from app_music.models import Album, Track


def home(request):
    ctx = {}
    ctx['album'] = album = Album.objects.first()
    ctx['tracks'] = tracks = Track.objects.filter(album=album)
    ctx['tracks_count'] = len(tracks)
    return render(request, 'home.html', ctx)
