Edgewall Software

Changes between Version 25 and Version 26 of GenshiTutorial


Ignore:
Timestamp:
Aug 30, 2007, 1:09:24 AM (17 years ago)
Author:
cmlenz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GenshiTutorial

    v25 v26  
    165165}}}
    166166
    167 This asks the template loader for a template named `index.html`, generates the output stream, and finally serializes the output to HTML. You you now reload the page in your browser, you should get back the following HTML:
     167This asks the template loader for a template named `index.html`, generates the output stream, and finally serializes the output to HTML. When you now reload the page in your browser, you should get back the following HTML response:
    168168
    169169{{{
     
    191191== Data Model ==
    192192
    193 To continue, we'll need to first add some classes to define the data model the application will use. As mentioned above, we're using a simple pickle file for persistence, so all we need to do here is create a couple of very simply Python classes.
     193To continue, we'll need to first add some Python classes to define the data model the application will use. As mentioned above, we're using a simple pickle file for persistence, so all we need to do here is create a couple of very simply Python classes.
    194194
    195195Inside the `geddit` directory, create a file named `model.py`, with the following content:
     
    236236}}}
    237237
    238 And import those classes in `geddit/controllers.py`, just below the other imports:
     238You'll need to import those classes in `geddit/controllers.py`, just below the other imports:
    239239
    240240{{{
     
    243243}}}
    244244
    245 Now let's add some initial content to the “database”. You'll need to stop the CherryPy server to do that. Then, in the terminal, from the tutorial directory, launch the interactive Python shell, and execute the following code:
     245Now let's add some initial content to the “database”.
     246
     247 '''Note: You'll need to stop the !CherryPy server to do that, otherwise the data is overwritten'''.
     248
     249In the terminal, from the tutorial directory, launch the interactive Python shell by executing `PYTHONPATH=. python`, and enter the following code:
    246250
    247251{{{