Procházet zdrojové kódy

Updating url for yelp query

David Leonard před 10 roky
rodič
revize
9a9ee3400e

+ 1 - 1
hackathon_starter/hackathon/scripts/yelp.py

@@ -10,7 +10,7 @@ TOKEN_SECRET = 'Rv4GrlYxYGhxUs14s0VBfk7JLJY'
 
 def requestData(location):
     data = []
-    url = 'http://api.yelp.com/v2/business/' + location
+    url = 'http://api.yelp.com/v2/business/' + location + '?'
 
     consumer = oauth2.Consumer(CONSUMER_KEY, CONSUMER_SECRET)
     oauth_request = oauth2.Request(method="GET", url=url)

+ 1 - 1
hackathon_starter/hackathon/templates/hackathon/yelp.html

@@ -16,7 +16,7 @@
           {% csrf_token %}
           {% load bootstrap %}
           <br>
-          <input type="text" name="location" class="form-control" placeholder="Enter a location, e.g: yelp-san-francisco?" value="" required autofocus>
+          <input type="text" name="location" class="form-control" placeholder="Enter a location, e.g: yelp-san-francisco" value="" required autofocus>
           <br>
           <button class="btn btn-lg btn-primary btn-block" type="submit">Search</button>
           <input type="hidden" name="submit" value="submit" />