Since you're moving this around: there's no a ahelper for this nonsense logic in django.utils.module_loading, please use it :)