Created
September 8, 2011 22:20
-
-
Save JoshAshby/1204935 to your computer and use it in GitHub Desktop.
Couchdbkit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import couchdbkit | |
database = couchdbkit.Server()["stats"] | |
class productDoc(couchdbkit.Document): | |
barcode = couchdbkit.StringProperty() | |
productDoc.set_db(database) | |
#these two both return a ViewResults object instead of the results | |
a = productDoc.view("products/all", include_docs=True)[0] | |
a = database.view("products/all", include_docs=True)[0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment