Edgewall Software

Changes between Version 110 and Version 111 of GenshiTutorial


Ignore:
Timestamp:
Apr 16, 2008, 10:03:22 PM (16 years ago)
Author:
grhm
Comment:

Fixed directory names for example code

Legend:

Unmodified
Added
Removed
Modified
  • GenshiTutorial

    v110 v111  
    544544But there's a problem here: Note how the input values have vanished from the form! We'd have to repopulate the form manually from the data submitted so far. We could do that by adding the required `value=""` attributes to the text fields in the template, but Genshi provides a more elegant way: the [wiki:Documentation/filters.html#html-form-filler HTMLFormFiller] stream filter. Given a dictionary of values, it can automatically populate HTML forms in the template output stream.
    545545
    546 To enable this functionality, first you'll need to add the following import to the `genshi/controller.py` file:
     546To enable this functionality, first you'll need to add the following import to the `geddit/controller.py` file:
    547547
    548548{{{
     
    624624}}}
    625625
    626 In the `genshi/controller.py` file, you can now remove the `from genshi.template import TemplateLoader` line, and also the instantiation of the `TemplateLoader`, as that is now done in our new library module. Of course, you'll have to import that library module instead:
     626In the `geddit/controller.py` file, you can now remove the `from genshi.template import TemplateLoader` line, and also the instantiation of the `TemplateLoader`, as that is now done in our new library module. Of course, you'll have to import that library module instead:
    627627
    628628{{{