summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorianb <devnull@localhost>2005-04-26 01:20:16 +0000
committerianb <devnull@localhost>2005-04-26 01:20:16 +0000
commit206e6061a7ee119f4a0dacc1493fed2e5f0b3e75 (patch)
treed7dea73b356c42b9b7f31e7df8e234a1e6c0aa79 /docs
parent0286fb672af5e4309225b83f57140e24d03a0414 (diff)
downloadpaste-206e6061a7ee119f4a0dacc1493fed2e5f0b3e75.tar.gz
Made the SQLObject configuration part explicit
Diffstat (limited to 'docs')
-rw-r--r--docs/TodoTutorial.txt13
1 files changed, 11 insertions, 2 deletions
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')