python 的 sys.path.append()
os.path.dirname(path) #return the file path
os.path.abspath(path) #return the absolute path
directory:
BASE_DIR = os.path.dirname( os.path.dirname( os.path.abspath( file ) ) )
Example
python 的 sys.path.append()
os.path.dirname(path) #return the file path
os.path.abspath(path) #return the absolute path
directory:
BASE_DIR = os.path.dirname( os.path.dirname( os.path.abspath( file ) ) )
Example