format content (#198)

This commit is contained in:
Markos Gogoulos
2021-05-26 18:35:21 +03:00
committed by GitHub
parent 2d49b1df29
commit 6df942ac4e
39 changed files with 420 additions and 962 deletions

View File

@ -1,6 +1,7 @@
from django.core.exceptions import ImproperlyConfigured
from importlib import import_module
from django.core.exceptions import ImproperlyConfigured
def import_class(path):
path_bits = path.split(".")
@ -14,9 +15,7 @@ def import_class(path):
module_itself = import_module(module_path)
if not hasattr(module_itself, class_name):
message = "The Python module '{}' has no '{}' class.".format(
module_path, class_name
)
message = "The Python module '{}' has no '{}' class.".format(module_path, class_name)
raise ImportError(message)
return getattr(module_itself, class_name)