The diffs didn't pick up an extra file I use
in the docs - it's output of an ipython session
that is included in (end of the file).
Please find attached. For now it needs to be placed
in the same directory as the calling file wiki20.rst.
Apologies.
Anita
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Docs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-docs?hl=en
-~----------~----~----~----~------~----~------~--~---
In [3]: a=DBSession.query(Page).first()
In [4]: a.__dict__
Out[4]:
{'_sa_instance_state': <sqlalchemy.orm.identity.IdentityManagedState object at
0x986348c>,
'data': u'initial data',
'id': 1,
'pagename': u'FrontPage'}
In [5]: help(a)
In [6]: b = Page('second pagetitle', 'Second Page of WikiWords wiki')
In [7]: DBSession.add(b)
In [8]: pages=DBSession.query(Page).all()
In [9]: [(page.data, page.pagename, page.id) for page in pages]
Out[9]:
[(u'initial data', u'FrontPage', 1),
(u'SecondPage of WikiWords wiki', u'second page', 2),
(u'Content of PageThree', u'third page', 3),
(u'This is the FifthPage of the WikiWords wiki', u'fifth page', 4),
('Second Page of WikiWords wiki', 'second pagetitle', 5)]