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)