# HG changeset patch # User cmlenz # Date 1176289322 0 # Node ID 2755b06148b3bbcf44dced19e187a0f1ea0028a2 # Parent 7884617bc94143f136b53f5a3ba051a76c8bca11 Fix undefined error in TurboGears example app, and some cleanup. diff --git a/examples/turbogears/genshitest/controllers.py b/examples/turbogears/genshitest/controllers.py --- a/examples/turbogears/genshitest/controllers.py +++ b/examples/turbogears/genshitest/controllers.py @@ -18,9 +18,7 @@ log.debug("Happy TurboGears Controller Responding For Duty") return dict(now=time.ctime(), widget=widgets.TextArea(name="widget_test", - default="This is a test of using " - "TurboGears widgets with " - "Genshi", + default="Lorem ipsum", rows=5, cols=40)) @expose(template="genshi-text:genshitest.templates.plain", diff --git a/examples/turbogears/genshitest/templates/master.html b/examples/turbogears/genshitest/templates/master.html --- a/examples/turbogears/genshitest/templates/master.html +++ b/examples/turbogears/genshitest/templates/master.html @@ -1,43 +1,36 @@ - + - - + - - + + Your title goes here - + - + - -
- - Login - - - Welcome ${tg.identity.user.display_name}. - Logout - + +
+ + Login + + + Welcome ${tg.identity.user.display_name}. + Logout +
-
- -
- +

TurboGears under the hood

- + diff --git a/examples/turbogears/genshitest/templates/welcome.html b/examples/turbogears/genshitest/templates/welcome.html --- a/examples/turbogears/genshitest/templates/welcome.html +++ b/examples/turbogears/genshitest/templates/welcome.html @@ -1,39 +1,34 @@ - + - + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:py="http://genshi.edgewall.org/"> + - + Welcome to TurboGears - - - -

Congratulations, your TurboGears application is running as of now.

- -

Are you ready to Gear Up?

- -

Take the following steps to dive right in:

+ -
    -
  1. Edit your project's model.py to create SQLObjects representing the data you're working with
  2. -
  3. Edit your dev.cfg file to point to the database you'll be using
  4. -
  5. Run "tg-admin sql create" to create the tables in the database
  6. -
  7. Edit controllers.py to add the functionality to your webapp
  8. -
  9. Change the master.kid template to have the headers and footers for your application.
  10. -
  11. Change welcome.kid (this template) or create a new one to display your data
  12. -
  13. Repeat steps 4-6 until done.
  14. -
  15. Profit!
  16. -
+ +

Congratulations, your TurboGears application is running as of + now.

-

If you haven't already, you might check out some of the documentation.

+

Using Genshi in TurboGears

-

Thanks for using TurboGears! See you on the mailing list and the "turbogears" channel on irc.freenode.org!

+

+ Please see the online + documentation + for general information on Genshi. +

+

Here's an example for using a TurboGears widget in a Genshi template:

${ET(widget.display())} -

Here's a link to the output of a plain-text template.

+

+ And here's a link to the output of a plain-text + template. +

- +