try to display feature name instead of id
This commit is contained in:
parent
67a4a7ce94
commit
b2382b96b6
|
@ -30,7 +30,8 @@ def search_related(request):
|
|||
id = request.GET.get("id", "0")
|
||||
feature = get_object_or_404(Feature, pk=id)
|
||||
similar_features = feature.similar_features()
|
||||
|
||||
for s in similar_features:
|
||||
s['feature_type'] = FeatureType.objects.get(pk=s.feature_type_id)
|
||||
return render_to_response("search_related.html", {
|
||||
'feature': feature,
|
||||
'similar_features': similar_features
|
||||
|
|
|
@ -38,8 +38,8 @@
|
|||
<table id="mapList">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Preferred Name</td>
|
||||
<td>Feature Type</td>
|
||||
<td>Name</td>
|
||||
<td>Type</td>
|
||||
<td>County</td>
|
||||
<td>State</td>
|
||||
</tr>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<script type="text/javascript" src="/static/js/jquery.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Similar features for {{ feature.preferred_name }}></h2>
|
||||
<h2>Similar features for {{ feature.preferred_name }}:</h2>
|
||||
|
||||
<table id="similarTable">
|
||||
<thead>
|
||||
|
@ -27,10 +27,10 @@
|
|||
{% for s in similar_features %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ s.preferred_name }}
|
||||
<a href="/admin/pleaces/feature/{{ s.id }}" title="View / Edit in Admin"> {{ s.preferred_name }} </a>
|
||||
</td>
|
||||
<td>
|
||||
{{ s.feature_type_id }}
|
||||
{{ s.feature_type }}
|
||||
</td>
|
||||
<td>
|
||||
{{ s.similarity }}
|
||||
|
|
Loading…
Reference in New Issue
Block a user