Use base_dir as the project root directory

This commit is contained in:
Sheng
2018-08-18 17:39:50 +08:00
parent d6de1340c4
commit f4197f0e4c
7 changed files with 38 additions and 35 deletions
+4
View File
@@ -36,3 +36,7 @@ def encode_multipart_formdata(fields, files):
def get_content_type(filename):
return mimetypes.guess_type(filename)[0] or 'application/octet-stream'
def read_file(path, encoding='utf-8'):
return open(path, 'rb').read().decode(encoding)