X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/e1fb3d13cc2300d7a838cae120a182faefd89097..19b6808a73f77fffdbb80d049dd1f8d81eec9d78:/apps/catalogue/views.py?ds=sidebyside diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index de2c17b28..5be5122bd 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -500,7 +500,7 @@ def book_sets(request, slug): book.tags = new_shelves + list(book.tags.filter(~Q(category='set') | ~Q(user=request.user))) if request.is_ajax(): - return HttpResponse(_('
Shelves were sucessfully saved.
')) + return JSONResponse('{"msg":"'+_("Shelves were sucessfully saved.
")+'", "after":"close"}') else: return HttpResponseRedirect('/') else: @@ -634,7 +634,7 @@ def new_set(request): new_set = new_set_form.save(request.user) if request.is_ajax(): - return HttpResponse(_('Shelf %s was successfully created
') % new_set) + return JSONResponse('{"id":"%d", "name":"%s", "msg":"Shelf %s was successfully created
"}' % (new_set.id, new_set.name, new_set)) else: return HttpResponseRedirect('/')