master
km0 3 years ago
parent dee12444e3
commit 110fd0da06

@ -37,14 +37,10 @@ def create_app(test_config=None):
from . import home
app.register_blueprint(home.bp)
from . import qr
app.register_blueprint(qr.bp)
# from . import karaoke
# app.register_blueprint(karaoke.bp)
app.wsgi_app = prefix.PrefixMiddleware(
app.wsgi_app, prefix=os.environ.get("URL_PREFIX", "")
)

@ -1,4 +1,4 @@
from flask import Blueprint, render_template
from flask import Blueprint, render_template, redirect
bp = Blueprint("home", __name__, url_prefix="/")
@ -8,6 +8,22 @@ bp = Blueprint("home", __name__, url_prefix="/")
def home():
return render_template("home.html")
@bp.route("/<slug>/")
def page(slug=None):
return slug
@bp.route("/%F0%9F%92%AC/")
@bp.route('/💬/')
def bitsi():
return redirect('https://issue.xpub.nl/17/unfinished-thoughts/')
@bp.route('/%F0%9F%A4%9D/')
@bp.route('/🤝/')
def connectless():
return redirect('https://pzwiki.wdka.nl/mediadesign/Connect-less')
@bp.route('/%F0%9F%96%8C/')
@bp.draw('/🖌/')
def draw():
return redirect('https://hub.xpub.nl/soupboat/xquisite/')
@bp.route('/%F0%9F%8D%A5/')
@bp.route('/🍥/')
def roll():
return redirect('https://issue.xpub.nl/17/katamari/')

@ -1,22 +0,0 @@
from flask import Blueprint, render_template, redirect, url_for
bp = Blueprint("qr", __name__, url_prefix="/")
@bp.route("/%F0%9F%92%AC/")
@bp.route('/play/')
def bitsi():
return redirect('https://issue.xpub.nl/17/unfinished-thoughts/')
@bp.route('/%F0%9F%A4%9D/')
def connectless():
return redirect('https://pzwiki.wdka.nl/mediadesign/Connect-less')
@bp.route('/%F0%9F%96%8C/')
def draw():
return redirect('https://hub.xpub.nl/soupboat/xquisite/')
@bp.route('/%F0%9F%8D%A5/')
def roll():
return redirect('https://issue.xpub.nl/17/katamari/')
Loading…
Cancel
Save