mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
* merge branch develop * bugfix, signals for virtualization's class wasn't correctly defined * updated webhooks for 2.4 and cleanup * updated docs to cover changes to supervisor config * review changes and further cleanup * updated redis connection settings * cleanup settings
This commit is contained in:
committed by
Jeremy Stretch
parent
4fd52d46bf
commit
836478c166
@ -71,3 +71,14 @@ def foreground_color(bg_color):
|
||||
return '000000'
|
||||
else:
|
||||
return 'ffffff'
|
||||
|
||||
|
||||
def dynamic_import(name):
|
||||
"""
|
||||
Dynamically import a class from an absolute path string
|
||||
"""
|
||||
components = name.split('.')
|
||||
mod = __import__(components[0])
|
||||
for comp in components[1:]:
|
||||
mod = getattr(mod, comp)
|
||||
return mod
|
||||
|
Reference in New Issue
Block a user