From 206e6061a7ee119f4a0dacc1493fed2e5f0b3e75 Mon Sep 17 00:00:00 2001 From: ianb Date: Tue, 26 Apr 2005 01:20:16 +0000 Subject: Made the SQLObject configuration part explicit --- docs/TodoTutorial.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/TodoTutorial.txt b/docs/TodoTutorial.txt index 0565330..2a68149 100644 --- a/docs/TodoTutorial.txt +++ b/docs/TodoTutorial.txt @@ -567,9 +567,10 @@ clause to the select statement. Here's the servlet that goes with it: .. raw:: html :file: resources/TodoTutorial/templates/index.pt.v1.gen.html -And this is what we get: +We also have to add a little magic to ``web/__init__.py`` to configure +SQLObject (this will be improved in the future): -.. comment (show it) +.. comment (make config) >>> create_file('web/__init__.py', 'v1', r""" ... import os @@ -590,6 +591,14 @@ And this is what we get: ... sqlobject.sqlhub.processConnection = sqlobject.connectionForURI( ... db_uri) ... """) + +.. raw:: html + :file: resources/TodoTutorial/web/__init__.py.v1.gen.html + +And this is what we get: + +.. comment (show it) + >>> change_file('__init__.py', ... [('insert', 5, "add_package('sqlobject')\n")]) >>> show('/', 'v1-frontpage') -- cgit v1.2.1