Set default ajax form template

This commit is contained in:
Oliver Walters 2019-06-05 22:08:22 +10:00
parent eced012ece
commit bcc08f982b

View File

@ -92,6 +92,10 @@ class AjaxMixin(object):
on the client side.
"""
# By default, point to the modal_form template
# (this can be overridden by a child class)
ajax_template_name = 'modal_form.html'
ajax_form_action = ''
ajax_form_title = ''
@ -165,10 +169,6 @@ class AjaxView(AjaxMixin, View):
""" An 'AJAXified' View for displaying an object
"""
# By default, point to the modal_form template
# (this can be overridden by a child class)
ajax_template_name = 'modal_form.html'
def post(self, request, *args, **kwargs):
return JsonResponse('', safe=False)