From 6f754be048c21cffd1172abe072bb2b89368cbf7 Mon Sep 17 00:00:00 2001 From: Michiel Holtkamp Date: Mon, 3 Feb 2020 19:22:17 +0100 Subject: [PATCH] Bugfix render_login_html_to_string (refs: #53) (#54) --- djangosaml2idp/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/djangosaml2idp/views.py b/djangosaml2idp/views.py index c9c90a8..2d1ce12 100644 --- a/djangosaml2idp/views.py +++ b/djangosaml2idp/views.py @@ -184,10 +184,10 @@ def build_authn_response(self, user, authn, resp_args, processor: BaseProcessor, ) return authn_resp - def render_login_html_to_string(self, template_name, context=None, request=None, using=None): + def render_login_html_to_string(self, context=None, request=None, using=None): """ Render the html response for the login action. Can be using a custom html template if set on the view. """ default_login_template_name = 'djangosaml2idp/login.html' - custom_login_template_name = getattr(self, 'login_html_template') + custom_login_template_name = getattr(self, 'login_html_template', None) if custom_login_template_name: try: template = get_template(custom_login_template_name, using=using)