On Fri, May 17, 2013 at 11:02 AM, Hélio Miranda <helio...@gmail.com> wrote:
> Hi
>
> I'm trying to do a test with EmbeddedDocument well:
> class Post (Document):
>      title = Stringfield (max_length = 60)
>      body = Stringfield ()
>      comments = ListField (EmbeddedDocumentField ('Comment'))
>
> pp = Post (title = 'hello', body = 'aa')
> pp.save ()
>
> class Comment (EmbeddedDocument):
>      author = Stringfield (max_length = 60)
>      body = Stringfield ()
>
> cc = Comment (author = 'I', body = 'o')
> cc.save ()
>
> But it is giving the following error: 'Comment' object has no attribute
> 'save'
> What am I doing wrong?

How does this relate to Django?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to