Got my music working again

This commit is contained in:
Tris Forster
2023-02-23 19:29:20 +11:00
parent d7892d355d
commit 928173976b
3 changed files with 5 additions and 11 deletions
+2 -8
View File
@@ -30,9 +30,7 @@ class ProjectItemListView(ProjectMixin, ListView):
def post(self, request, **kwargs):
project = self.get_project()
project_works = project.works.all()
project_works = self.project.works.all()
instruments = request.POST.getlist('instruments')
works = request.POST.getlist('works')
@@ -58,7 +56,7 @@ class ProjectItemListView(ProjectMixin, ListView):
result = extract_and_concat(sections)
download_name = f'{project.name}.pdf'
download_name = f'{self.project.name}.pdf'
response = FileResponse(result, content_type="application/pdf")
response['Content-Disposition'] = f'inline; filename="{download_name}"'
@@ -74,10 +72,6 @@ class ProjectItemListView(ProjectMixin, ListView):
data['instrument'] = self.request.session.get('instrument', 'Score')
data['part'] = self.request.session.get('part', '0')
data['running_time'] = self.get_queryset().aggregate(Sum('work__running_time'))['work__running_time__sum']
#if running_time:
# data['running_time'] = "{0:d}:{1:02d}".format(int(running_time / 60), running_time % 60)
#else:
# data['running_time'] = "-:--"
return data