Skip to content

Commit 40bf3af

Browse files
committed
Fix import template_failure function error
Fixes Issue #78
1 parent 0a2e0ee commit 40bf3af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

djangosaml2/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from importlib import import_module
1615
from django.conf import settings
1716
from django.core.exceptions import ImproperlyConfigured
17+
from django.utils.module_loading import import_string
1818
from saml2.s_utils import UnknownSystemEntity
1919

2020

@@ -77,6 +77,6 @@ def fail_acs_response(request, *args, **kwargs):
7777
The default behavior uses SAML specific template that is rendered on any ACS error,
7878
but this can be simply changed so that PermissionDenied exception is raised instead.
7979
"""
80-
failure_function = import_module(get_custom_setting('SAML_ACS_FAILURE_RESPONSE_FUNCTION',
80+
failure_function = import_string(get_custom_setting('SAML_ACS_FAILURE_RESPONSE_FUNCTION',
8181
'djangosaml2.acs_failures.template_failure'))
8282
return failure_function(request, *args, **kwargs)

0 commit comments

Comments
 (0)