Skip to content

Instantly share code, notes, and snippets.

@TheMuellenator
Forked from angelabauer/index.html
Last active January 24, 2026 04:52
Show Gist options
  • Select an option

  • Save TheMuellenator/c6177ac108650fdc8246d29ff0fab284 to your computer and use it in GitHub Desktop.

Select an option

Save TheMuellenator/c6177ac108650fdc8246d29ff0fab284 to your computer and use it in GitHub Desktop.
Day 60 L458 - Simple HTML Form Revision
<!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)
@TheMuellenator

Copy link
Copy Markdown
Author

Including basic main.py file in gist.

@Akhinh

Akhinh commented Sep 22, 2023

Copy link
Copy Markdown

i tried to use ROW and COl class in the div

@OldGoat5086

Copy link
Copy Markdown

I get a 404 error from running main and clicking on the development server address. Any Suggestions?

@OldGoat5086

Copy link
Copy Markdown

Had to refactor main.py to place it directly under the project name.

@DevSingh28

Copy link
Copy Markdown

t a 404 error from running main and clicking on the development server address. Any Sugg

can you share your code

@OldGoat5086

OldGoat5086 commented Nov 18, 2023 via email

Copy link
Copy Markdown

@pedsf1968

Copy link
Copy Markdown
<!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>

@mhkocaoglan

Copy link
Copy Markdown

where is the half of course there is no video after flask and everything expected to learn by yourself

@DrCalebGordon

Copy link
Copy Markdown

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

@mhkocaoglan

Copy link
Copy Markdown

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.

@DevSingh28

Copy link
Copy Markdown

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.

@kubilaykaand

Copy link
Copy Markdown

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('/')

@Ryanico

Ryanico commented Dec 25, 2024

Copy link
Copy Markdown

please help, I keep on running the current main.py but it seems there is another code running in the background. I am using PyCharm

@abrilohd

Copy link
Copy Markdown

in the source code of this page it says app.route('/'), where it should be : @app.route('/')

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('/')

above from function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment