Commit 44e59085 authored by wanli's avatar wanli

update

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