Skip to content

Instantly share code, notes, and snippets.

@qoda
Created September 23, 2010 09:11
Show Gist options
  • Save qoda/593375 to your computer and use it in GitHub Desktop.
Save qoda/593375 to your computer and use it in GitHub Desktop.
device_families_module = getattr(settings, 'DEVICE_FAMILIES', 'templateswitcher.device_families')
exec "from %s import %s" % (
str().join(device_families_module.split('.')[:len(device_families_module.split('.')) - 1]),
device_families_module.split('.')[-1]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment