1
0
Fork 0

Merge pull request #1934 from tversteeg/partially-read-shelf

Add 'Stopped Reading' shelf
This commit is contained in:
Mouse Reeve 2022-03-16 13:51:15 -07:00 committed by GitHub
commit f2b0b306e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 206 additions and 7 deletions

View file

@ -137,6 +137,7 @@ def handle_reading_status(user, shelf, book, privacy):
"to-read": "wants to read",
"reading": "started reading",
"read": "finished reading",
"stopped-reading": "stopped reading",
}[shelf.identifier]
except KeyError:
# it's a non-standard shelf, don't worry about it

View file

@ -29,6 +29,7 @@ class ReadingStatus(View):
"want": "want.html",
"start": "start.html",
"finish": "finish.html",
"stop": "stop.html",
}.get(status)
if not template:
return HttpResponseNotFound()
@ -41,6 +42,7 @@ class ReadingStatus(View):
"want": models.Shelf.TO_READ,
"start": models.Shelf.READING,
"finish": models.Shelf.READ_FINISHED,
"stop": models.Shelf.STOPPED_READING,
}.get(status)
if not identifier:
return HttpResponseBadRequest()