Merge github.com:nitmir/django-cas-server

This commit is contained in:
Valentin Samir 2016-06-03 14:12:38 +02:00
commit a8cb006989

View File

@ -38,7 +38,7 @@ def JsonResponse(request, data):
def import_attr(path): def import_attr(path):
"""transform a python module.attr path to the attr""" """transform a python module.attr path to the attr"""
if not isinstance(path, str): if not isinstance(path, str):
return string return path
if "." not in path: if "." not in path:
ValueError("%r should be of the form `module.attr` and we just got `attr`" % path) ValueError("%r should be of the form `module.attr` and we just got `attr`" % path)
module, attr = path.rsplit('.', 1) module, attr = path.rsplit('.', 1)