Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from flask import Flask, render_template, send_from_directory
|
| 2 |
+
|
| 3 |
+
app = Flask(__name__)
|
| 4 |
+
|
| 5 |
+
@app.route('/login')
|
| 6 |
+
def login():
|
| 7 |
+
return render_template('/apps-hub/login.html')
|
| 8 |
+
|
| 9 |
+
@app.route('/')
|
| 10 |
+
def app_selector():
|
| 11 |
+
return render_template('/apps-hub/app-selector.html')
|
| 12 |
+
|
| 13 |
+
@app.route('/profile')
|
| 14 |
+
def profile():
|
| 15 |
+
return render_template('/apps-hub/profile.html')
|
| 16 |
+
|
| 17 |
+
@app.route('/research-pro')
|
| 18 |
+
def research_pro():
|
| 19 |
+
return render_template('/apps-hub/research-pro.html')
|
| 20 |
+
|
| 21 |
+
@app.route('/js/<path:path>')
|
| 22 |
+
def send_js(path):
|
| 23 |
+
return send_from_directory('static/js/apps-hub/', path)
|
| 24 |
+
|
| 25 |
+
@app.route('/css/<path:path>')
|
| 26 |
+
def send_css(path):
|
| 27 |
+
return send_from_directory('static/css/apps-hub/', path)
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
if __name__ == '__main__':
|
| 31 |
+
app.run(debug=True)
|