Skip to content
Snippets Groups Projects
Commit 9f193233 authored by xinjiel2's avatar xinjiel2
Browse files

edited view

parent 8d254ccb
Branches
No related tags found
No related merge requests found
...@@ -16,12 +16,22 @@ def index(request): ...@@ -16,12 +16,22 @@ def index(request):
if error == "no": if error == "no":
docs = SERVER['tweet_results'] docs = SERVER['tweet_results']
print(docs) #print(docs)
for doc in docs: #print(docs.view('city/city-view',key = "melbourne"))
print(docs[doc])
context = {'file':docs[doc]} #GET /tweet_resutls/_design/city/_view/city-view HTTP/1.1
cityInfo = []
for doc in docs.view('city/city-view',group = True):
print(doc.key, doc.value)
cityInfo.append(doc)
print(cityInfo)
context = {'cityInfo':cityInfo}
#context = {'file':2}
else: else:
context = {'file':error} context = {'file':error}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment