Merge github.com:nitmir/django-cas-server
This commit is contained in:
commit
a8cb006989
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user