diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2023-10-08 13:00:47 -0600 |
---|---|---|
committer | Navan Chauhan <navanchauhan@gmail.com> | 2023-10-08 13:00:47 -0600 |
commit | a8cfef3848fdd1600efd2e76a5c6789170e1e1f8 (patch) | |
tree | e1ccd8e0cf245b91ce9739b7417fc0c7fe621851 | |
parent | 43a062e4b7322a7ee90e7040d1d149d8867788d6 (diff) |
-rw-r--r-- | app.py | 9 | ||||
-rw-r--r-- | templates/tasks.html | 2 |
2 files changed, 6 insertions, 5 deletions
@@ -42,6 +42,7 @@ def new_vehicle(): def search(): if request.headers.get("HX-Request"): print(request.form["search"]) + search_query = request.form["search"].title() print(request.form["car_details"]) make = request.form["car_details"].split(" ")[1] car_details = request.form["car_details"] @@ -50,7 +51,7 @@ def search(): current_task.append({ "date": "Oct 7", "desc_plain": "Searching for ", - "desc_bold": request.form["search"], + "desc_bold": search_query, "icon": "check" }) @@ -61,7 +62,7 @@ def search(): "desc_bold": pref_forum[0], "icon": "prog" }) - data = search_on_forum(pref_forum[0], request.form["search"], random.randint(4,8)) + data = search_on_forum(pref_forum[0], search_query, random.randint(4,8)) current_task[-1]["icon"] = "check" current_task.append({ "date": "Oct 7", @@ -75,7 +76,7 @@ def search(): "desc_bold": "", "icon": "prog" }) - pred = get_tasks_from_pages(data, request.form["search"], car_details) + pred = get_tasks_from_pages(data, search_query, car_details) current_task[-1]["icon"] = "check" tasks = ["Have you tried turning your car on and off?"] try: @@ -84,7 +85,7 @@ def search(): print(my_cars, "MY CARS") except: print("Uh oh! Claude didn't return any results!") - return render_template("tasks.html", search_query=request.form["search"], to_do=tasks) + return render_template("tasks.html", search_query=search_query, to_do=tasks) @app.route("/progress") def progress(): diff --git a/templates/tasks.html b/templates/tasks.html index 1a2e633..1feea49 100644 --- a/templates/tasks.html +++ b/templates/tasks.html @@ -1,5 +1,5 @@ <div class="bg-white shadow mx-auto sm:rounded-lg"> - <div class="bg-gray-500 mx-auto px-4 sm:px-6 lg:px-8"> + <div class="mx-auto px-4 sm:px-6 lg:px-8"> <fieldset> <legend class="text-base font-semibold leading-8 text-gray-900">"{{search_query}}" Tasks</legend> <div class="mt-4 divide-y divide-gray-200 border-b border-t border-gray-200"> |