WIP: Deployment #3

Manually merged
MassiveAtoms merged 8 commits from development into master 2020-08-02 14:56:54 +00:00
4 changed files with 15 additions and 1 deletions
Showing only changes of commit 6a2f89d36e - Show all commits

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]

Binary file not shown.

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

View File

@ -0,0 +1,10 @@
{
"CALIBRE_DIR": "PATH\\TO\\your\\calibre\library",
"SECRET_KEY": "u(8^+rb%rz5hsx4v^^y(ul7g(4n7a8!db@s*9(m5cs*2_ppy8+",
"ALLOWED_HOSTS": [
"127.0.0.1"
],
"INTERNAL_IPS": [
"127.0.0.1"
]
}