Skip to content

Commit bf54cc7

Browse files
author
m.davino
committed
added setting variables for custom templates
1 parent f1507e4 commit bf54cc7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

djangosaml2/views.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ class LoginView(SPConfigMixin, View):
110110
will be rendered.
111111
"""
112112

113-
wayf_template = 'djangosaml2/wayf.html'
114-
authorization_error_template = 'djangosaml2/auth_error.html'
115-
post_binding_form_template = 'djangosaml2/post_binding_form.html'
113+
wayf_template = getattr(settings,'SAML2_CUSTOM_WAYF_TEMPLATE','djangosaml2/wayf.html')
114+
authorization_error_template = getattr(settings,'SAML2_CUSTOM_AUTHORIZATION_ERROR_TEMPLATE','djangosaml2/auth_error.html')
115+
post_binding_form_template = getattr(settings,'SAML2_CUSTOM_POST_BINDING_FORM_TEMPLATE','djangosaml2/post_binding_form.html')
116116

117117
def get_next_path(self, request: HttpRequest) -> str:
118118
''' Returns the path to put in the RelayState to redirect the user to after having logged in.

0 commit comments

Comments
 (0)