mirror of
https://github.com/Hopiu/django-fobi.git
synced 2026-05-11 22:33:09 +00:00
style fixes
This commit is contained in:
parent
2fea8dc6d0
commit
8151f1f1ff
1 changed files with 10 additions and 10 deletions
|
|
@ -11,7 +11,7 @@ from nine.versions import DJANGO_GTE_1_7
|
|||
from .conf import get_setting
|
||||
|
||||
# In Django a dotted path can be used up to the app config class. In
|
||||
# such cases the old-school autodiscovery of modules doesn't work but we
|
||||
# such cases the old-school auto-discovery of modules doesn't work but we
|
||||
# have a great Django `autodiscover_modules` tool then. In cases if Django
|
||||
# version is >= 1.7, we use the Django `autodiscover_modules` tool falling back
|
||||
# to our own implementation of it otherwise.
|
||||
|
|
@ -26,14 +26,14 @@ else:
|
|||
app_path = __import__(
|
||||
app, {}, {}, [app.split('.')[-1]]
|
||||
).__path__
|
||||
except (AttributeError, TypeError) as e:
|
||||
logger.debug(str(e))
|
||||
except (AttributeError, TypeError) as err:
|
||||
logger.debug(str(err))
|
||||
continue
|
||||
|
||||
try:
|
||||
imp.find_module(module_name, app_path)
|
||||
except ImportError as e:
|
||||
logger.debug(str(e))
|
||||
except ImportError as err:
|
||||
logger.debug(str(err))
|
||||
continue
|
||||
__import__('{0}.{1}'.format(app, module_name))
|
||||
|
||||
|
|
@ -60,20 +60,20 @@ def autodiscover():
|
|||
|
||||
FORM_ELEMENT_PLUGINS_MODULE_NAME = get_setting(
|
||||
'FORM_ELEMENT_PLUGINS_MODULE_NAME'
|
||||
)
|
||||
)
|
||||
FORM_HANDLER_PLUGINS_MODULE_NAME = get_setting(
|
||||
'FORM_HANDLER_PLUGINS_MODULE_NAME'
|
||||
)
|
||||
)
|
||||
THEMES_MODULE_NAME = get_setting(
|
||||
'THEMES_MODULE_NAME'
|
||||
)
|
||||
)
|
||||
FORM_CALLBACKS_MODULE_NAME = get_setting(
|
||||
'FORM_CALLBACKS_MODULE_NAME'
|
||||
)
|
||||
)
|
||||
|
||||
FORM_IMPORTER_PLUGINS_MODULE_NAME = get_setting(
|
||||
'FORM_IMPORTER_PLUGINS_MODULE_NAME'
|
||||
)
|
||||
)
|
||||
|
||||
# Discover modules
|
||||
autodiscover_modules(FORM_ELEMENT_PLUGINS_MODULE_NAME)
|
||||
|
|
|
|||
Loading…
Reference in a new issue