From f2c2e2d6f2faf761beee7bed3348d9fa9d4b6d57 Mon Sep 17 00:00:00 2001 From: James Turk Date: Thu, 22 Sep 2011 12:52:01 -0400 Subject: [PATCH] update tracked view to take id instead of URL --- oyster/templates/log_row.html | 2 +- oyster/web.py | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/oyster/templates/log_row.html b/oyster/templates/log_row.html index 3300832..a2aac21 100644 --- a/oyster/templates/log_row.html +++ b/oyster/templates/log_row.html @@ -1,7 +1,7 @@ {{log.action}} - {{log.url}} + {{log.url}} {{log.timestamp.strftime("%Y-%m-%d %H:%M:%S")}} {% if log.error %}{{log.error}}{% endif %} diff --git a/oyster/web.py b/oyster/web.py index 42c7c26..494d644 100644 --- a/oyster/web.py +++ b/oyster/web.py @@ -85,10 +85,9 @@ def tracked(): return json.dumps(tracked, cls=JSONEncoder) -@app.route('/tracked/') -def tracked_view(url): - url = _path_fixer(url) - doc = client.db.tracked.find_one({'url': url}) +@app.route('/tracked/') +def tracked_view(id): + doc = client.db.tracked.find_one({'_id': id}) return json.dumps(doc, cls=JSONEncoder)