michal.korcak 1 mesiac pred
rodič
commit
082dc6f78e
2 zmenil súbory, kde vykonal 21 pridanie a 2 odobranie
  1. 2 2
      main.py
  2. 19 0
      templates/index.html

+ 2 - 2
main.py

@@ -1,7 +1,7 @@
-from flask import Flask
+from flask import Flask, render_template
 
 app = Flask(__name__)
 
 @app.route('/')
 def hello_world():
-    return 'Ahojky světe!'
+    return render_template('index.html')

+ 19 - 0
templates/index.html

@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Formular</title>
+</head>
+<body>
+    <form action="/" method="post">
+        <label for="name">Name:</label>
+        <input type="text" id="name" name="name"><br><br>
+
+        <label for="email">Email:</label>
+        <input type="email" id="email" name="email"><br><br>
+
+        <input type="submit" value="Submit">
+    </form>
+</body>
+</html>