|Issue 199:||Defect: The documentation on mappings has errors on the inlined code|
|1 person starred this issue and may be notified of changes.||Back to list|
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()
Sep 7, 2011
This is a dupe of #195. Sorry.
Jul 6, 2014
(No comment was entered for this change.)
|► Sign in to add a comment|