-
-
Save TheMuellenator/c6177ac108650fdc8246d29ff0fab284 to your computer and use it in GitHub Desktop.
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
</head> | |
<body> | |
<form> | |
<label>Name</label> | |
<input type="text" placeholder="name"> | |
<label>Password</label> | |
<input type="text" placeholder="password"> | |
<button type="submit">Ok</button> | |
</form> | |
</body> | |
</html> |
from flask import Flask, render_template | |
app = Flask(__name__) | |
@app.route('/') | |
def home(): | |
return render_template("index.html") | |
if __name__ == "__main__": | |
app.run(debug=True) |
i tried to use ROW and COl class in the div
I get a 404 error from running main and clicking on the development server address. Any Suggestions?
Had to refactor main.py to place it directly under the project name.
t a 404 error from running main and clicking on the development server address. Any Sugg
can you share your code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<h1>It works!</h1>
<label>Name</label>
<input type="text" id="name" name="name" placeholder="name"/>
<label>Password</label>
<input type="password" id="password" name="password" placeholder="password"/>
<button type="submit">Ok</button>
</body>
</html>
where is the half of course there is no video after flask and everything expected to learn by yourself
I think flask is the last part of the curriculum that we learn. the rest is just making projects based off of what we learned
sory sir, not at all, there are doesns of subjects that needs to be handled. flask is 54 th day and more projects starts after 80 th day.
My nesting was all messed up. I believe this code works: Main.py in venv Dictionary: rom flask import Flask, render_template, request app = Flask(name) @app.route('/') def home(): return render_template("index.html") @app.route("/login", methods=["POST"]) def receive_data(): name = request.form["username"] password = request.form["password"] return f"
Name: {name}, Password: {password}
" if name=="main": app.run(debug=True) index.html in templates dictionary <title>Test</title> Name Password Ok Good luck! In a message dated 11/18/2023 10:18:59 AM Eastern Standard Time, @.*** writes: @DevSingh28 commented on this gist. t a 404 error from running main and clicking on the development server address. Any Sugg can you share your code — Reply to this email directly, view it on GitHub or unsubscribe. You are receiving this email because you commented on the thread. Triage notifications on the go with GitHub Mobile for iOS or Android.
name = request.form["username"]
password = request.form["password"] . The correct usage involves parentheses () rather than square brackets [] for method invocation.
I get a 404 error from running main and clicking on the development server address. Any Suggestions?
in the source code of this page it says app.route('/'), where it should be : @app.route('/')
Including basic main.py file in gist.