Upload files to ''

This commit is contained in:
Jeison Yehuda Amihud (Blender Dumbass) 2022-03-30 16:11:55 +00:00
parent 46a9130e41
commit f204444115

View file

@ -50,12 +50,11 @@ class handler(BaseHTTPRequestHandler):
# If the user is at the front page, let him get only the search bar
self.send("""
<form action="/search" method="GET">
<input type="text" name="item" class="search" placeholder="Name of Software">
<input type="submit" value="Search">
</form>
""")
page = ""
page = render.search_widget(page)
page = page + "<p>Please search for any software to which you would like to find a Free Software replacement.</p>"
page = render.source_code_link(page)
self.send(page)
elif "/search?item=" in self.path:
@ -73,18 +72,13 @@ class handler(BaseHTTPRequestHandler):
software = self.path.replace("/", "").replace("+", " ")
software_data = search.search_app(software)
page = """
<form action="/search" method="GET">
<input type="text" name="item" class="search" placeholder="Name of Software">
<input type="submit" value="Search">
</form>
"""
page = ""
page = render.search_widget(page)
# Let's add the found software to the page
page = render.html(page, software_data)
page = render.suggestions(page, software_data)
page = render.source_code_link(page)
self.send(page)