community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rlenfer...@apache.org
Subject svn commit: r1888912 - /comdev/nearby_people/nearby/views.py
Date Sun, 18 Apr 2021 16:21:59 GMT
Author: rlenferink
Date: Sun Apr 18 16:21:59 2021
New Revision: 1888912

URL: http://svn.apache.org/viewvc?rev=1888912&view=rev
Log:
Fixed Django error: Inconsistent use of tabs and spaces

Modified:
    comdev/nearby_people/nearby/views.py

Modified: comdev/nearby_people/nearby/views.py
URL: http://svn.apache.org/viewvc/comdev/nearby_people/nearby/views.py?rev=1888912&r1=1888911&r2=1888912&view=diff
==============================================================================
--- comdev/nearby_people/nearby/views.py (original)
+++ comdev/nearby_people/nearby/views.py Sun Apr 18 16:21:59 2021
@@ -51,26 +51,26 @@ def pick_place(request):
    message = None
 
    if request.POST:
-		form = PlaceForm(request.POST)
-		if form.is_valid():
-			results = geoname.search(
-						name=form.data["place_name"],
-						featureClass=["P","T"],
-						lang="EN",
-						maxRows=10,
-			)
-			for res in results:
-				places.append({
-					'name': res['name'],
-					'latitude': res['lat'],
-					'longitude': res['lng'],
-					'country': res['countryCode']
-				})
-			else:
-				message = "We can't work out the location you mean, sorry. Please double check your spelling,
or try searching for a nearby place which is larger."
+      form = PlaceForm(request.POST)
+      if form.is_valid():
+         results = geoname.search(
+                     name=form.data["place_name"],
+                     featureClass=["P","T"],
+                     lang="EN",
+                     maxRows=10,
+         )
+         for res in results:
+            places.append({
+                'name': res['name'],
+                'latitude': res['lat'],
+                'longitude': res['lng'],
+                'country': res['countryCode']
+            })
+         else:
+            message = "We can't work out the location you mean, sorry. Please double check
your spelling, or try searching for a nearby place which is larger."
    else:
-       form = PlaceForm()
-       form.set_type( request.GET.get("type","") )
+      form = PlaceForm()
+      form.set_type( request.GET.get("type","") )
 
    # We support html+json for responses, only html for requests
    types = ["html"]
@@ -128,7 +128,7 @@ def retrieve_people_data(form):
       'people_type': people_type,
    }
    return data
-	
+
 def find_people(request):
    data = retrieve_people_data(LocationForm(request.GET))
    data['gmaps_key'] = GMAPS_KEY



Mime
View raw message