Python formatting

This commit is contained in:
Mouse Reeve 2022-01-04 18:05:26 -08:00
parent 5981575f0e
commit cc4469e7e1
2 changed files with 4 additions and 2 deletions

View file

@ -3,7 +3,7 @@
{% load cache %} {% load cache %}
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}
{% cache 900 shelve_button request.user.id book.id %} {% cache shelve_button request.user.id book.id %}
{% with book.id|uuid as uuid %} {% with book.id|uuid as uuid %}
{% active_shelf book as active_shelf %} {% active_shelf book as active_shelf %}

View file

@ -47,7 +47,9 @@ class ReadingStatus(View):
return HttpResponseBadRequest() return HttpResponseBadRequest()
# invalidate the template cache # invalidate the template cache
cache_key = make_template_fragment_key("shelve_button", [request.user.id, book_id]) cache_key = make_template_fragment_key(
"shelve_button", [request.user.id, book_id]
)
cache.delete(cache_key) cache.delete(cache_key)
desired_shelf = get_object_or_404( desired_shelf = get_object_or_404(