Commit 44e59085 authored by wanli's avatar wanli

update

parent c8ec8ab5
......@@ -40,8 +40,8 @@ backend/scheduler.db
backend/*.db-journal
backend/backup/*
backend/upload/
backend/uploads
backend/static/uploads
backend/uploads/
backend/static/
backend/config.ini
release/
......
# evm-store
EVM应用商店
\ No newline at end of file
EVM应用商店
# 启动项目
1. 创建虚拟环境
```
cd backend
python3 -m venv ./venv
source venv/bin/activate
```
如果需要退出虚拟环境,命令是:
```
deactivate
```
2. 安装依赖
```
pip3 install -r requirements.txt
```
......@@ -26,7 +26,7 @@ config = dict(
TABLE_PREFIX='evm_store_',
MD5_SALT="EhuqUkwV",
UPLOAD_SERVER="{}://{}:{}/".format(conf.get('uploads', 'protocol'), conf.get('uploads', 'host'), conf.get('uploads', 'port')),
UPLOAD_PATH=conf.get('uploads', 'upload_path'),
UPLOAD_PATH=os.getcwd(),
UPLOAD_DIR=conf.get('uploads', 'upload_dir'),
TEMPLATE_PATH=os.path.join(os.getcwd(), "static"),
STATIC_PATH=os.path.join(os.getcwd(), "static"),
......
......@@ -2,7 +2,7 @@
port = 80
host = store.evmiot.com
protocol = http
upload_path = /www/wwwroot/store.evmiot.com
upload_path = ./
upload_dir = uploads
netdisc = netdisc
......
......@@ -24,7 +24,7 @@ class AppsManager(object):
def add(self, data):
with db_session:
result = Apps.get(app_name=data.get("app_name"))
result = Apps.get(app_name=data.get("app_name"), is_delete=False)
if result:
return False, "app_name has been exists."
......
......@@ -39,7 +39,7 @@ class DownloadManager(object):
def add(self, data):
with db_session:
app = Apps.get(id=data.get("app"))
app = Apps.get(id=data.get("app"), is_delete=False)
if not app:
return False, "app does not found"
......
......@@ -62,7 +62,7 @@ def update_nginx_conf():
elif content.find(" server_name localhost;") != -1:
dst.write(" server_name {};\n".format(conf.get('uploads', 'host')))
elif content.find(" root html;") != -1:
dst.write(" root {};\n".format(conf.get('uploads', 'upload_path')))
dst.write(" root {};\n".format(os.getcwd()))
else:
dst.write(content)
print(target_file, source_file)
......
......@@ -188,7 +188,6 @@ class EpkApp(object):
"buff_length": len(epkFileBytes)
}
pprint.pprint(ret)
result = ret
return result
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment