Skip to content

Commit

Permalink
Change card URL to use name instead of UUID.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmaister committed Mar 20, 2020
1 parent 0892c6b commit f91653a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@ def setup():
elapsed_time = time.time() - start_time
return "OK "+ str(elapsed_time)

@app.route("/analize/<uuid>")
def analize_uuid(uuid):
@app.route("/analize/<name>")
def analize_uuid(name):
conn = database.get_db(g)
database.save_history(request, conn, "ANALYZE", uuid)
database.save_history(request, conn, "ANALYZE", name)

analysis = rules.analize(app, conn, uuid)
analysis = rules.analize(app, conn, name)
return render_template('analysis.html', analysis=analysis)

@app.route("/history")
Expand Down
2 changes: 1 addition & 1 deletion templates/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ <h3 class="title is-3">{{rows|length}} Results:</h3>
<div class="results-container">
{% for row in rows %}
<div class="result-card" id="{{row['uuid']}}">
<a class="button is-link" target="_blank" href="analize/{{row['uuid']}}">🔗 {{row['name']}}</a>
<a class="button is-link" target="_blank" href="analize/{{row['name']}}">🔗 {{row['name']}}</a>
<div>
Colors: [
{% if row['colors'] != None %}
Expand Down

0 comments on commit f91653a

Please sign in to comment.