diff --git a/app.py b/app.py index 7b11fe9..a0b420e 100644 --- a/app.py +++ b/app.py @@ -4,19 +4,21 @@ @app.get("/") def index(): - """ - TODO: Render the home page provided under templates/index.html in the repository - """ - return "TODO" + # """ + # TODO: Render the home page provided under templates/index.html in the repository + # """ + return render_template("index.html") @app.get("/search") def search(): - """ - TODO: - 1. Capture the word that is being searched - 2. Seach for the word on Google and display results - """ - return "TODO" + # """ + # TODO: + # 1. Capture the word that is being searched + # 2. Seach for the word on Google and display results + # """ + + args = request.args.get("q") + return redirect(f"https://www.google.com/search?q={args}") if __name__ == "__main__": app.run() \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 126f18e..fce7a08 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,29 +1,4 @@ -backcall==0.2.0 -click==8.0.1 -decorator==5.0.9 -Flask==2.0.1 -gunicorn==20.1.0 -ipykernel==5.5.5 -ipython==7.24.0 -ipython-genutils==0.2.0 -itsdangerous==2.0.1 -jedi==0.18.0 -Jinja2==3.0.1 -jupyter-client==6.1.12 -jupyter-core==4.7.1 -MarkupSafe==2.0.1 -matplotlib-inline==0.1.2 -parso==0.8.2 -pexpect==4.8.0 -pickleshare==0.7.5 -Pillow==8.2.0 -prompt-toolkit==3.0.18 -ptyprocess==0.7.0 -Pygments==2.9.0 -python-dateutil==2.8.1 -pyzmq==22.1.0 -six==1.16.0 -tornado==6.1 -traitlets==5.0.5 -wcwidth==0.2.5 -Werkzeug==2.0.1 \ No newline at end of file +Flask==3.1.3 +gunicorn==23.0.0 +ipykernel==7.3.0 +Pillow==12.3.0