From 88c478081a7ed3faaab898c1e715746e5bebf202 Mon Sep 17 00:00:00 2001 From: fenix Date: Tue, 13 Feb 2024 15:48:42 +0100 Subject: [PATCH] =?UTF-8?q?Flask=20|=20pre-=20a=C3=B1adimos=20la=20plantil?= =?UTF-8?q?la?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 2 +- decorators.py | 6 +++--- templates/base.html | 16 ++++++++++++++++ 3 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 templates/base.html diff --git a/app.py b/app.py index 890545c..18a3fee 100644 --- a/app.py +++ b/app.py @@ -4,7 +4,7 @@ app = Flask(__name__) @app.route("/") def home(): - return "Hello, World!" + return "HOLA, World!" if __name__ == "__main__": app.run(debug=True) diff --git a/decorators.py b/decorators.py index 0df6c8e..0653d3a 100644 --- a/decorators.py +++ b/decorators.py @@ -1,5 +1,5 @@ def do_twice(func): - def wrapper_do_twice(): - func() - func() + def wrapper_do_twice(*args, **kwargs): + func(*args, **kwargs) + func(*args, **kwargs) return wrapper_do_twice diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..baeab16 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,16 @@ +{# templates/base.html #} + + + + + + + {{ title }} + + + + +

Welcome to {{ title }}!

+ + +