Changes between Version 17 and Version 18 of GenshiTutorial
- Timestamp:
- Aug 29, 2007, 5:27:56 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GenshiTutorial
v17 v18 32 32 1. Create a directory that should contain the application 33 33 1. Inside that directory create a Python package named geddit by doing the following: 34 * Create a {{{geddit}}}directory35 * Create an empty file called {{{__init__.py}}} inside the {{{geddit}}}directory36 1. Inside that package, create a file called {{{controller.py}}}with the following content:34 * Create a `geddit` directory 35 * Create an empty file called `__init__.py` inside the `geddit` directory 36 1. Inside that package, create a file called `controller.py` with the following content: 37 37 38 38 {{{ … … 141 141 This is basically an almost static HTML file with some simple variable substitution. 142 142 143 We now need to change the controller code so that this template is used. First, add the Genshi `TemplateLoader` to the imports at the top of the `ge nshi/controller.py` file, and instantiate a loader for the `geddit/templates` directory:143 We now need to change the controller code so that this template is used. First, add the Genshi `TemplateLoader` to the imports at the top of the `geddit/controller.py` file, and instantiate a loader for the `geddit/templates` directory: 144 144 145 145 {{{