Init
This commit is contained in:
11
music_storage/music/views.py
Normal file
11
music_storage/music/views.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from django import views as django_views
|
||||
from django.shortcuts import render
|
||||
from django.http.request import HttpRequest
|
||||
|
||||
from music.models import Track
|
||||
|
||||
|
||||
class TrackListView(django_views.View):
|
||||
def get(self, request: HttpRequest, *args, **kwargs):
|
||||
tracks = Track.objects.all()
|
||||
return render(request, "music/track_list.html", {"tracks": tracks})
|
||||
Reference in New Issue
Block a user