diff --git a/README.md b/README.md
index edc8406b9..a32abc4c8 100644
--- a/README.md
+++ b/README.md
@@ -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
diff --git a/main.py b/main.py
index 78498c20b..062704129 100644
--- a/main.py
+++ b/main.py
@@ -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()
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 000000000..f163f4d22
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,2 @@
+flask
+gunicorn
\ No newline at end of file
diff --git a/templates/default/site.html b/templates/default/site.html
index c62c0fff6..fc657a27d 100755
--- a/templates/default/site.html
+++ b/templates/default/site.html
@@ -1,4 +1,7 @@
-$def with (tData)
+{% extends "default/layout.html" %}
+
+{% block content %}
+
@@ -63,4 +66,5 @@ $def with (tData)
},500);
setCookie('serverType','$web.ctx.session.webserver');
-
\ No newline at end of file
+
+{% endblock %}
\ No newline at end of file
diff --git a/views/__init__.py b/views/__init__.py
index 19f8f6c43..fc82c6661 100644
--- a/views/__init__.py
+++ b/views/__init__.py
@@ -1,2 +1,3 @@
-from frontend import *
+from dashboard import *
+from site import *
diff --git a/views/dashboard.py b/views/dashboard.py
new file mode 100644
index 000000000..8ddd18035
--- /dev/null
+++ b/views/dashboard.py
@@ -0,0 +1,11 @@
+# coding:utf-8
+
+from flask import Flask
+from flask import Blueprint,render_template
+
+
+dashboard = Blueprint('dashboard', __name__, template_folder='templates')
+
+@dashboard.route("/")
+def index():
+ return render_template('default/index.html')
\ No newline at end of file
diff --git a/views/frontend.py b/views/frontend.py
deleted file mode 100644
index 089d6ad97..000000000
--- a/views/frontend.py
+++ /dev/null
@@ -1,9 +0,0 @@
-from flask import Flask
-from flask import Blueprint,render_template
-
-
-frontend = Blueprint('frontend', __name__, template_folder='templates')
-
-@frontend.route("/")
-def index():
- return render_template('default/index.html')
\ No newline at end of file
diff --git a/views/site.py b/views/site.py
new file mode 100644
index 000000000..b9059240a
--- /dev/null
+++ b/views/site.py
@@ -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')
\ No newline at end of file