changes in next previous
This commit is contained in:
commit
c36f2bc298
|
@ -24,8 +24,8 @@ class FeatureSearchManager(models.GeoManager):
|
|||
cursor = connection.cursor()
|
||||
cursor.execute("""SELECT set_limit(%f)""" % threshold)
|
||||
|
||||
def find(self, bbox=None, text=None, adm1=None, adm2=None, threshold=0.5, srid=4326):
|
||||
qset = self.get_query_set()
|
||||
def find(self, bbox=None, text=None, adm1=None, adm2=None, is_primary=True, threshold=0.5, srid=4326):
|
||||
qset = self.get_query_set().filter(is_primary=is_primary)
|
||||
if bbox:
|
||||
(minx, miny, maxx, maxy) = bbox
|
||||
bbox = Polygon(((minx,miny),(minx,maxy),(maxx,maxy),(maxx,miny),(minx,miny)),srid=srid)
|
||||
|
|
|
@ -128,11 +128,14 @@ def add_relation(request):
|
|||
if rel_obj.id:
|
||||
verb = "deleted"
|
||||
rel_obj.delete()
|
||||
if relation == "conflates":
|
||||
feature2.is_primary = True
|
||||
feature2.save()
|
||||
else:
|
||||
return render_to_json_response({'error': 'relation is already deleted'})
|
||||
else:
|
||||
rel_obj.save()
|
||||
if relation == "subsumes":
|
||||
if relation == "conflates":
|
||||
feature2.is_primary = False
|
||||
feature2.save()
|
||||
return render_to_json_response({'success': 'relation %s successfully.' % verb})
|
||||
|
|
|
@ -210,10 +210,10 @@ font-size:10px;}
|
|||
{-moz-box-shadow:2px 3px 4px #c6c0c0;
|
||||
-webkit-box-shadow:2px 3px 4px #c6c0c0;
|
||||
box-shadow:2px 3px 4px #c6c0c0;
|
||||
-moz-transform:scale(1.25);
|
||||
/*-moz-transform:scale(1.25);
|
||||
-webkit-transform:scale(1.25);
|
||||
-o-transform:scale(1.25);
|
||||
transform:scale(1.25);}
|
||||
transform:scale(1.25);}*/
|
||||
|
||||
/*.paginateSelected li*/ /*do i need to repeat all these classes from the .paginate div ?, also do the same for first child and last child please*/
|
||||
/*{float:left;
|
||||
|
|
Loading…
Reference in New Issue
Block a user