What steps will reproduce the problem?
1. Copy and paste the examples from the mapping.html in the interpreter
(removing, of course, the leading >>> and ...)
What is the expected output? What do you see instead?
A working example.
An error, NameError: name 'Document' is not defined
What version of the product are you using? On what operating system?
A clone from hg. Debian Wheezy.
Please provide any additional information below.
This is easily fixed:
diff -r 77f4db4628bf couchdb/mapping.py
--- a/couchdb/mapping.py Sat Jun 04 17:32:53 2011 +0100
+++ b/couchdb/mapping.py Wed Sep 07 08:33:18 2011 -0400
@@ -15,7 +15,7 @@
To define a document mapping, you declare a Python class inherited from
`Document`, and add any number of `Field` attributes:
->>> from couchdb.mapping import TextField, IntegerField, DateField
+>>> from couchdb.mapping import Document, TextField, IntegerField, DateField
>>> class Person(Document):
... name = TextField()
... age = IntegerField()
Original issue reported on code.google.com by mva.led@gmail.com on 7 Sep 2011 at 12:36
Original issue reported on code.google.com by
mva.led@gmail.com
on 7 Sep 2011 at 12:36