X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/8fefd8bdaca07a3f5607de79c081dc0f7876fbc7..e1da9fe83615e4096983b4b184e32e5a984fe402:/apps/social/views.py?ds=sidebyside diff --git a/apps/social/views.py b/apps/social/views.py index d5362a436..abb2d9bef 100644 --- a/apps/social/views.py +++ b/apps/social/views.py @@ -51,9 +51,14 @@ class ObjectSetsFormView(AjaxableFormView): ajax_redirect = True POST_login = True - def form_args(self, request, slug): - book = get_object_or_404(Book, slug=slug) - return (book, request.user), {} + def get_object(self, request, slug): + return get_object_or_404(Book, slug=slug) + + def context_description(self, request, obj): + return obj.pretty_title() + + def form_args(self, request, obj): + return (obj, request.user), {} def unlike_book(request, slug):