X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/276656dcc680e1a35103d310dea046152ddc3785..07a8fb3687c7e82ab8d4c172c90269f32b818217:/apps/social/views.py?ds=inline diff --git a/apps/social/views.py b/apps/social/views.py index 6ded289b2..abb2d9bef 100644 --- a/apps/social/views.py +++ b/apps/social/views.py @@ -46,13 +46,19 @@ def my_shelf(request): class ObjectSetsFormView(AjaxableFormView): form_class = forms.ObjectSetsForm + placeholdize = True template = 'social/sets_form.html' 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):