Damjan schrieb:
> Now, creating pages and then adding tags to them like so:
> p1.tags.append(Tag('test'))
> p2.tags.append(Tag('test'))
> 
> will actually create two 'test' tags in the database...

Have a look at my tagging tutorial at

http://paddyland.serveblog.net/article/16#updating-tags

Although it uses SQLObject, the pattern used in the 'update_tags' method
(http://paddyland.serveblog.net/article/16#updating-tags) can be applied to
SQLAlchemy as well.

> also does p1.tags be a list of Tag instances? Can it be a list of
> normal strings?

taglist = [str(tag.name) for tag in p1.tags]


HTH, Chris

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to