From f660a33425d20ed45093e3de4fa8cf4bfc805a27 Mon Sep 17 00:00:00 2001 From: Stef Date: Tue, 1 Apr 2025 11:51:20 +0200 Subject: [PATCH] Adding forms testing --- __pycache__/forms.cpython-312.pyc | Bin 0 -> 886 bytes forms.py | 13 +++++++++++++ run.py | 16 ++++++++++++++-- templates/forms.html | 23 +++++++++++++++++++++++ 4 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 __pycache__/forms.cpython-312.pyc create mode 100644 forms.py create mode 100644 templates/forms.html diff --git a/__pycache__/forms.cpython-312.pyc b/__pycache__/forms.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c61de8db4e9428e6cffc59aeadb3fecce9865af1 GIT binary patch literal 886 zcmZ`%ON-M`6h1evCTZ)U${@PXjY1HLBFv&lT}SsXx+H-o}@)b@Gic4UiUn{b3at8I`DJn-S@#O0`L`; z)sdIN+~UF!xZn~W0%8(^vfvAWXo`VkN`Y+3xlQzypk$T^2(SsRGzM3uWGWVUOf|PE z+*Pr<+aI+x1IOhle-(I z<Zj_Bmu+@&mEhbmmUO|q!re!(TE>VNLZ)@1 zffpimT|;CTz^Vur5NZf{&Pyn*tpLMf9C-|%CAEk^C-SK6;y1GQlU;_NFDr2g=PSs= zM+I%QrM>=VKRLAp33;jWThis is the default page" +@app.route("/forms") +def forms(): + service_form = ServiceForm() + + if service_form.validate_on_submit: # type: ignore + session["name"] + + return render_template("forms.html", form=service_form) + + # Prevent execution when imported by other script if __name__ == "__main__": # Start the flask server in debug mode for development purposes diff --git a/templates/forms.html b/templates/forms.html new file mode 100644 index 0000000..ed55008 --- /dev/null +++ b/templates/forms.html @@ -0,0 +1,23 @@ + + + + + + + Testing + + + +

Hallo

+
+ {{ form.hidden_tag() }} + {{ form.naam.label }} {{form.naam}} +
+ {{ form.url.label}} {{form.url}} +
+ {{ form.submit() }} +
+ + + + \ No newline at end of file