Merge pull request #1934 from tversteeg/partially-read-shelf
Add 'Stopped Reading' shelf
This commit is contained in:
commit
f2b0b306e9
19 changed files with 206 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue