def _shortpath(abspath):
 b = os.path.dirname(os.path.normpath(os.sys.modules[settings.SETTINGS_MODULE].__file__))
 p = os.path.normpath(abspath)
 return p[len(os.path.commonprefix([b, p])):]

def _shortpath ( abspath ) : b = os . path . dirname ( os . path . normpath ( os . sys . modules [ settings . SETTINGS_MODULE ] . __file__ ) ) p = os . path . normpath ( abspath ) return p [ len ( os . path . commonprefix ( [ b , p ] ) ) : ]
make an absolute path relative to the projects settings module .