From 67a4a7ce9469f39c894159db3ea5257242b7f2b4 Mon Sep 17 00:00:00 2001
From: Sanj
Date: Mon, 29 Aug 2011 18:33:29 +0530
Subject: [PATCH] basic similar features page
---
gazetteer/places/views.py | 1 +
gazetteer/static/js/gazetteer.js | 2 +-
gazetteer/templates/search_related.html | 38 +++++++++++++++++++++++++
3 files changed, 40 insertions(+), 1 deletion(-)
diff --git a/gazetteer/places/views.py b/gazetteer/places/views.py
index d1f2d44..d93795f 100644
--- a/gazetteer/places/views.py
+++ b/gazetteer/places/views.py
@@ -30,6 +30,7 @@ def search_related(request):
id = request.GET.get("id", "0")
feature = get_object_or_404(Feature, pk=id)
similar_features = feature.similar_features()
+
return render_to_response("search_related.html", {
'feature': feature,
'similar_features': similar_features
diff --git a/gazetteer/static/js/gazetteer.js b/gazetteer/static/js/gazetteer.js
index 2bae7cb..c013055 100644
--- a/gazetteer/static/js/gazetteer.js
+++ b/gazetteer/static/js/gazetteer.js
@@ -39,7 +39,7 @@ $(function() {
function getRow(props) {
var $tr = $('');
var $one = $('
+ Name + | ++ Feature Type + | ++ Similarity + | ++ Distance + | +
+ {{ s.preferred_name }} + | ++ {{ s.feature_type_id }} + | ++ {{ s.similarity }} + | ++ {{ s.distance }} + | +