Add static site
This commit is contained in:
parent
a1f2be21ba
commit
4fec7f7da6
3 changed files with 11 additions and 2 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -1,3 +1,6 @@
|
||||||
[submodule "templates/home"]
|
[submodule "templates/home"]
|
||||||
path = templates/home
|
path = templates/home
|
||||||
url = https://github.com/wpi-acm/hack-wpi-static.git
|
url = https://github.com/wpi-acm/hack-wpi-static.git
|
||||||
|
[submodule "goathacks/templates/home"]
|
||||||
|
path = goathacks/templates/home
|
||||||
|
url = https://github.com/WPI-ACM/Hack-WPI-Static
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from flask import Flask, render_template
|
from flask import Flask, render_template, send_from_directory
|
||||||
from flask_sqlalchemy import SQLAlchemy
|
from flask_sqlalchemy import SQLAlchemy
|
||||||
from flask_migrate import Migrate
|
from flask_migrate import Migrate
|
||||||
from flask_login import LoginManager
|
from flask_login import LoginManager
|
||||||
|
@ -47,7 +47,12 @@ def create_app():
|
||||||
# Homepage
|
# Homepage
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
def index():
|
def index():
|
||||||
return render_template("index.html")
|
return render_template("home/index.html")
|
||||||
|
|
||||||
|
# homepage assets
|
||||||
|
@app.route("/assets/<path:path>")
|
||||||
|
def assets(path):
|
||||||
|
return send_from_directory('templates/home/assets', path)
|
||||||
|
|
||||||
return app
|
return app
|
||||||
|
|
||||||
|
|
1
goathacks/templates/home
Submodule
1
goathacks/templates/home
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit d24d276382d7b50f5a2bdbdc661567ab102f7971
|
Loading…
Add table
Reference in a new issue