Guest User

Untitled

a guest
Jan 22nd, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. import couchdbkit
  2.  
  3. database = couchdbkit.Server()["stats"]
  4.  
  5. class productDoc(couchdbkit.Document):
  6. barcode = couchdbkit.StringProperty()
  7.  
  8.  
  9. productDoc.set_db(database)
  10.  
  11. #these two both return a ViewResults object instead of the results
  12. a = productDoc.view("products/all", include_docs=True)[0]
  13. a = database.view("products/all", include_docs=True)[0]
Add Comment
Please, Sign In to add comment