Commit 5dac4d5b by Berlin

修改项目结构

parent 6d22cfcf
from flask import Flask
from flask import Flask, render_template
import os
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello World!'
return "<h1 style='color:red'>Hello World</h1>"
@app.route('/hello/')
def hello(name=None):
return render_template('test.html', name=name)
from service.common.testss import *
if __name__ == '__main__':
app.run()
from flask import Flask, render_template
from DA import app
@app.route('/ttest/')
@app.route('/ttest/<name>')
def ttest(name=None):
return render_template('test.html',name =name)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Hello from Flask</title>
{% if name %}
<h1>Hello {{ name }}!</h1>
{% else %}
<h1>Hello, World!</h1>
{% endif %}
</head>
<body>
</body>
</html>
\ No newline at end of file
# daplatform
# daplatform-front
> A Vue.js project
......@@ -44,4 +44,39 @@ textAnnotation:文字标注模块
https://cn.vuejs.org/v2/guide/
https://element.eleme.cn/#/zh-CN/component/quickstart
\ No newline at end of file
https://element.eleme.cn/#/zh-CN/component/quickstart
## DAPlatform
- 使用框架:Flask
- 可能用到的环境配置:
```python
# python3
# 解释器选择:..\DAPlatform\venv\Scripts\python.exe
pip install flask
```
- 目录结构
static: CSS 和 JavaScript 文件
templates:前端文件
service:三类功能模块的实现
util:一些通用的方法
DA.py:项目入口
config.json:配置(数据库等)
venv:虚拟环境
## Tips:
- Flask快速入门:
https://dormousehole.readthedocs.io/en/latest/quickstart.html
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