Compare commits

...

2 Commits

Author SHA1 Message Date
TinyAtoms
6a2f89d36e fixed book download, linux path is case sensitive 2020-08-01 20:07:09 -03:00
TinyAtoms
ed03ea4a1c stuff 2020-08-01 19:54:04 -03:00
2 changed files with 5 additions and 1 deletions

4
.gitignore vendored
View File

@ -4,6 +4,10 @@ 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}" context["download"] = f"{context['object'].path}/{download.name}.{download.format.lower()}"
return context return context