소스 검색

Updating url for yelp query

David Leonard 10 년 전
부모
커밋
9a9ee3400e
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      hackathon_starter/hackathon/scripts/yelp.py
  2. 1 1
      hackathon_starter/hackathon/templates/hackathon/yelp.html

+ 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" />