This commit is contained in:
Schuyler Erle 2011-08-31 19:25:38 -07:00
commit 1f4333bf94
2 changed files with 5 additions and 3 deletions

View File

@ -59,6 +59,7 @@ def search_json(request):
''' '''
This function will be removed. No need for this page. This function will be removed. No need for this page.
''' '''
'''
def search_related(request): def search_related(request):
id = request.GET.get("id", "0") id = request.GET.get("id", "0")
feature = get_object_or_404(Feature, pk=id) feature = get_object_or_404(Feature, pk=id)
@ -78,7 +79,7 @@ def search_related(request):
'feature': feature, 'feature': feature,
'similar_features': d 'similar_features': d
}) })
'''
def search_related_json(request, id): def search_related_json(request, id):
# id = request.GET.get("id", "0") # id = request.GET.get("id", "0")
@ -102,7 +103,8 @@ def search_related_json(request, id):
'similarity': s.similarity, 'similarity': s.similarity,
'distance': s.distance, 'distance': s.distance,
'time_frame': time_frame, 'time_frame': time_frame,
'is_primary': s.is_primary 'is_primary': s.is_primary,
'relationship': ''
}) })
return render_to_json_response(d) return render_to_json_response(d)

View File

@ -12,7 +12,7 @@ urlpatterns = patterns('',
(r'^$', 'places.views.search'), (r'^$', 'places.views.search'),
('^search$', 'places.views.search'), ('^search$', 'places.views.search'),
('^feature/search.json$', 'places.views.search_json'), ('^feature/search.json$', 'places.views.search_json'),
('^search_related$', 'places.views.search_related'), # ('^search_related$', 'places.views.search_related'),
('^feature/(?P<id>\d+)/similar.json$', 'places.views.search_related_json'), ('^feature/(?P<id>\d+)/similar.json$', 'places.views.search_related_json'),
('^auth_record.json$', 'places.views.auth_record_json'), ('^auth_record.json$', 'places.views.auth_record_json'),
('^time_frame.json$', 'places.views.time_frame_json'), ('^time_frame.json$', 'places.views.time_frame_json'),