This commit is contained in:
Mr Chen
2018-09-25 13:59:20 +08:00
parent 76e2047519
commit 40ff5be361
7 changed files with 32 additions and 7 deletions
+1
View File
@@ -10,3 +10,4 @@ curl -fsSL https://raw.githubusercontent.com/midoks/mdweb/master/install/instal
- pip install pip==9.0.3
- pip install flask
- pip install gunicorn
- pip install -r requirements.txt
+6 -2
View File
@@ -1,12 +1,15 @@
# coding:utf-8
from flask import Flask
from flask import Blueprint,render_template
from views import frontend
from views import dashboard,site
app = Flask(__name__)
app.debug = True
DEFAULT_MODULES = (
(frontend, ""),
(dashboard, "/"),
(site, "/site"),
)
def setting_modules(app, modules):
@@ -15,5 +18,6 @@ def setting_modules(app, modules):
setting_modules(app, DEFAULT_MODULES)
if __name__ == "__main__":
app.run()
+2
View File
@@ -0,0 +1,2 @@
flask
gunicorn
+6 -2
View File
@@ -1,4 +1,7 @@
$def with (tData)
{% extends "default/layout.html" %}
{% block content %}
<div class="main-content pb55">
<div class="container-fluid">
<div class="pos-box bgw mtb15">
@@ -63,4 +66,5 @@ $def with (tData)
},500);
setCookie('serverType','$web.ctx.session.webserver');
</script>
</script>
{% endblock %}
+2 -1
View File
@@ -1,2 +1,3 @@
from frontend import *
from dashboard import *
from site import *
+4 -2
View File
@@ -1,9 +1,11 @@
# coding:utf-8
from flask import Flask
from flask import Blueprint,render_template
frontend = Blueprint('frontend', __name__, template_folder='templates')
dashboard = Blueprint('dashboard', __name__, template_folder='templates')
@frontend.route("/")
@dashboard.route("/")
def index():
return render_template('default/index.html')
+11
View File
@@ -0,0 +1,11 @@
# coding:utf-8
from flask import Flask
from flask import Blueprint,render_template
site = Blueprint('site', __name__, template_folder='templates')
@site.route("/")
def index():
return render_template('default/site.html')