Hemanth-Thaluru commited on
Commit
1c0dff8
1 Parent(s): 58904c3

added input and html

Browse files
__pycache__/main.cpython-310.pyc CHANGED
Binary files a/__pycache__/main.cpython-310.pyc and b/__pycache__/main.cpython-310.pyc differ
 
main.py CHANGED
@@ -2,12 +2,8 @@ from flask import Flask
2
  from flask import render_template
3
  app = Flask(__name__)
4
 
5
- @app.route('/')
6
- def hello_world():
7
- return 'Hello World!'
8
-
9
 
10
- @app.route('/hello/')
11
- @app.route('/hello/<name>')
12
  def hello(name=None):
13
  return render_template('hello.html', name=name)
 
2
  from flask import render_template
3
  app = Flask(__name__)
4
 
 
 
 
 
5
 
6
+ @app.route('/')
7
+ @app.route('/<name>')
8
  def hello(name=None):
9
  return render_template('hello.html', name=name)
templates/hello.html CHANGED
@@ -1,7 +1,9 @@
1
  <!doctype html>
2
  <title>Hello from Flask</title>
3
  {% if name %}
4
- <h1>Hello {{ name }}!</h1>
5
  {% else %}
6
- <h1>Hello, World!</h1>
 
 
7
  {% endif %}
 
1
  <!doctype html>
2
  <title>Hello from Flask</title>
3
  {% if name %}
4
+ <h1>Hello {{ name }}!</h1>
5
  {% else %}
6
+ <h1>Hello, World!</h1>
7
+ <input type="text" name="name">
8
+ <h2>Can run anything in btwn</h2>
9
  {% endif %}