Chapter 2.3. Say Hi! (Simple Template)

Okay, now for the obligatory Hello World example. It is really easy, so it won’t take more than 30 seconds.

Go to the hello directory within your application path, and to the templates directory within the hello directory, and find the welcome.kid file. Open it up in a text editor (or whatever programming editor you use).

Replace everything inside the <body></body> tags with <h1>Hello World</h1>.

Your welcome.kid file should now look like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR
/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" ...

Get Rapid Web Applications with TurboGears: Using Python to Create Ajax-Powered Sites now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.