remove select_related call
This commit is contained in:
parent
c6894cccef
commit
7554003088
|
@ -67,9 +67,9 @@ def areas(request):
|
|||
def stops(request):
|
||||
q = request.GET.get("q", "")
|
||||
if q != '':
|
||||
qset = Stop.objects.find_approximate(q, TRIGRAM_THRESHOLD).select_related('road', 'area')
|
||||
qset = Stop.objects.find_approximate(q, TRIGRAM_THRESHOLD)
|
||||
else:
|
||||
qset = Stop.objects.all().select_related('road', 'area')
|
||||
qset = Stop.objects.all()
|
||||
srid = int(request.GET.get("srid", 4326))
|
||||
return render_to_json_response({
|
||||
'type': 'FeatureCollection',
|
||||
|
|
|
@ -160,7 +160,7 @@ class Stop(models.Model):
|
|||
'direction': self.dbdirection,
|
||||
'routes': ", ".join([r.alias for r in routes]),
|
||||
'alternative_names': ", ".join([a.name for a in self.alt_names.all().filter(typ='common')]),
|
||||
'url': self.get_absolute_url()
|
||||
'url': self.get_absolute_url()
|
||||
}
|
||||
|
||||
def get_geojson(self, srid=4326):
|
||||
|
|
Loading…
Reference in New Issue
Block a user