Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 17 and Version 18 of SimpleWidgetForm


Ignore:
Timestamp:
04/14/06 12:50:48 (13 years ago)
Author:
oefe
Comment:

More 0.9a4 updates, and note on using the tutorial

Legend:

Unmodified
Added
Removed
Modified
  • SimpleWidgetForm

    v17 v18  
    1212This tutorial is designed to introduce TurboGears 0.8 users to the new 
    1313widgets, error handling, and decorators for Turbogears 0.9. It is current as 
    14 of revision 767 (Feb 13, 2006) and should be valid through 0.9 final. 
     14of version 0.9a4 and should be valid through 0.9 final. 
    1515 
    1616This application accepts and displays comments. Unlike most TurboGears 
     
    3232As in 0.8, tg-admin quickstart creates a new project. This project was created 
    3333with the name ``FormsTutorial``. 
     34 
     35* Note: This tutorial does not contain step-by-step instructions to create the final project. 
     36  Instead, download and unpack the final project and read the source code 
     37  along with the tutorial. 
    3438 
    3539The first thing users upgrading from 0.8 should notice is that the configuration 
     
    6569processing. 
    6670 
    67 TODO: As of 0.9a4, the following paragraph is not true: 
    68  
    6971You may notice that templates passed to ``@expose`` in this example don't 
    7072start with "formstutorial". This is the new relative import feature in Kid. 
     
    7375Take a quick glance at ``formstutorial/templates/welcome.kid``.  
    7476 
    75 TODO: As of 0.9a4, welcome.kid doesn't use std.url: 
    7677The main feature 
    7778to notice here is the use of ``std.url`` for the link. If your project was 
     
    144145on the screen, so a declarative syntax is provided and is used in this 
    145146project. To take advantage of this syntax, simply subclass 
    146 ``widgets.WidgetsDeclaration``. Widgets declared this way will automatically 
     147``widgets.WidgetsList``. Widgets declared this way will automatically 
    147148have their name set to the attribute name but are otherwise exactly as they 
    148149would be if you created them as shown above. When instantiated, the widgets 
     
    199200``Int`` validator, for example, you'd get a python integer rather than a 
    200201string containing an integer). If you list the field names out 
    201 as attributes in the decorated function, as in the example, the values get put 
    202 into the appropriate attributes. If, on the other hand, you put a keyword 
     202as arguments in the decorated function, as in the example, the values get put 
     203into the appropriate arguments. If, on the other hand, you put a keyword 
    203204argument parameter, e.g.:: 
    204205