Compare commits

..

No commits in common. "6a2f89d36e9c0a7dc7ce62337deaa3c5de8c58dc" and "af1bfc06a5e8c8dcb353310dc124cbf8b0aefa87" have entirely different histories.

2 changed files with 1 additions and 5 deletions

4
.gitignore vendored
View File

@ -4,10 +4,6 @@ db.sqlite3
dummyusers.json dummyusers.json
*.prof *.prof
# IDE
.vscode
# Byte-compiled / optimized / DLL files # Byte-compiled / optimized / DLL files
__pycache__/ __pycache__/
*.py[cod] *.py[cod]

View File

@ -149,7 +149,7 @@ class BookDetailView(generic.DetailView):
pass pass
context["imgpath"] = context["object"].path + "/cover.jpg" context["imgpath"] = context["object"].path + "/cover.jpg"
download = Data.objects.get(book=context["object"].id) download = Data.objects.get(book=context["object"].id)
context["download"] = f"{context['object'].path}/{download.name}.{download.format.lower()}" context["download"] = f"{context['object'].path}/{download.name}.{download.format}"
return context return context