fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use MANAGERS
[wolnelektury.git]
/
apps
/
catalogue
/
views.py
diff --git
a/apps/catalogue/views.py
b/apps/catalogue/views.py
index
599fde1
..
fc27e02
100644
(file)
--- a/
apps/catalogue/views.py
+++ b/
apps/catalogue/views.py
@@
-536,6
+536,11
@@
class CustomPDFFormView(AjaxableFormView):
submit = ugettext_lazy('Download')
honeypot = True
submit = ugettext_lazy('Download')
honeypot = True
+ def __call__(self, *args, **kwargs):
+ if settings.NO_CUSTOM_PDF:
+ raise Http404('Custom PDF is disabled')
+ return super(CustomPDFFormView, self).__call__(*args, **kwargs)
+
def form_args(self, request, obj):
"""Override to parse view args and give additional args to the form."""
return (obj,), {}
def form_args(self, request, obj):
"""Override to parse view args and give additional args to the form."""
return (obj,), {}