2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-22 23:31:52 +00:00
This commit is contained in:
substantialnoninfringinguser 2009-07-03 20:49:04 +01:00
parent 83fa1ea9ac
commit 2c67994531

View File

@ -2,7 +2,6 @@ from troggle.core.models import Cave, CaveAndEntrance, Survey, Expedition, QM
import troggle.core.models as models
import troggle.settings as settings
from django.forms.models import formset_factory
import search
from django.core.urlresolvers import reverse
from utils import render_with_context # see views_logbooks for explanation on this.
from django.http import HttpResponseRedirect
@ -69,17 +68,6 @@ def subcave(request, cave_id, subcave):
print subcave
return render_with_context(request,'subcave.html', {'subcave': subcave,'cave':cave})
def caveSearch(request):
query_string = ''
found_entries = None
if ('q' in request.GET) and request.GET['q'].strip():
query_string = request.GET['q']
entry_query = search.get_query(query_string, ['underground_description','official_name',])
found_entries = Cave.objects.filter(entry_query)
return render_with_context(request,'cavesearch.html',
{ 'query_string': query_string, 'found_entries': found_entries,})
def surveyindex(request):
surveys=Survey.objects.all()
expeditions=Expedition.objects.order_by("-year")