diff options
author | jwansek <eddie.atten.ea29@gmail.com> | 2022-02-06 16:55:00 +0000 |
---|---|---|
committer | jwansek <eddie.atten.ea29@gmail.com> | 2022-02-06 16:55:00 +0000 |
commit | e8285e533c8ed7ff3e68f72b0bbac04b478f19c9 (patch) | |
tree | c4ee6e12a1f543ed03e42516d1dc3497c0fc230d /app.py | |
parent | 6f3bca8d3aafe67a5b30a456ab5e80319930e1b6 (diff) | |
download | boymoder.blog-e8285e533c8ed7ff3e68f72b0bbac04b478f19c9.tar.gz boymoder.blog-e8285e533c8ed7ff3e68f72b0bbac04b478f19c9.zip |
added linux ISO CD form
Diffstat (limited to 'app.py')
-rw-r--r-- | app.py | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -157,6 +157,15 @@ def serve_nhdl(): **get_template_items("Hentai Downloader", db) ) +@app.route("/isocd") +def serve_iso_form(): + with database.Database() as db: + return flask.render_template( + "isocd.jinja", + **get_template_items("Get a GNU/Linux install CD", db), + iso_options = db.get_iso_cd_options() + ) + @app.route("/zip/<zipfile>") def serve_zip(zipfile): return flask.send_from_directory(os.path.join(".", "static", "zips"), zipfile) @@ -169,6 +178,20 @@ def redirect_nhdl(): except (TypeError, ValueError, KeyError): flask.abort(400) +@app.route("/getisocd", methods = ["POST"]) +def get_iso_cd(): + req = dict(flask.request.form) + print(req) + with database.Database() as db: + id_ = db.append_cd_orders(**req) + print(id_) + return flask.render_template( + "isocd_confirmation.jinja", + **get_template_items("Get a GNU/Linux install CD", db), + email = req["email"], + req = req, + id_ = id_ + ) @app.route("/random") def serve_random(): |