def get_project_root():
 django_settings_module = os.environ.get('DJANGO_SETTINGS_MODULE')
 if (not django_settings_module):
  module_str = settings.SETTINGS_MODULE
 else:
  module_str = django_settings_module.split('.')[0]
 mod = import_module(module_str)
 return os.path.dirname(os.path.abspath(mod.__file__))

def get_project_root ( ) : django_settings_module = os . environ . get ( 'DJANGO_SETTINGS_MODULE' ) if ( not django_settings_module ) : module_str = settings . SETTINGS_MODULE else : module_str = django_settings_module . split ( '.' ) [ 0 ] mod = import_module ( module_str ) return os . path . dirname ( os . path . abspath ( mod . __file__ ) )
get the project root directory .