diff --git a/app.py b/app.py index 0a8dd74..6000a18 100644 --- a/app.py +++ b/app.py @@ -6,6 +6,10 @@ app = Flask(__name__) def home(): return render_template('index.html') +@app.route ('/form', methods=['GET','POST']) +def form(): + return render_template('form.html') + if __name__ == '__main__': app.run(debug=True) \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index bc91076..cc5ba51 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,21 +1,9 @@ - - - {% block title %}{% endblock %} + + + {% block title %}{% endblock %} -

Homepage

- - - - - - - - - - - {% block content %}{% endblock %} diff --git a/templates/form.html b/templates/form.html new file mode 100644 index 0000000..9a61b76 --- /dev/null +++ b/templates/form.html @@ -0,0 +1,18 @@ +{% extends "base.html" %} + +{% block title %} + Title: Form +{% endblock %} + +{% block content %} + + + + + + + + + + +{% endblock %} \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 27f0922..e33e434 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,3 +1,9 @@ {% extends "base.html" %} -{% block title %}Homepage{% endblock %} -{% block content %}

Test

{% endblock %} \ No newline at end of file + +{% block title %} + Title: Index +{% endblock %} + +{% block content %} + Content: Index +{% endblock %} \ No newline at end of file