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 2 and Version 3 of ListWidgetFromForeignKey


Ignore:
Timestamp:
01/16/06 11:48:53 (13 years ago)
Author:
randall@…
Comment:

Corrected mispelled DataController

Legend:

Unmodified
Added
Removed
Modified
  • ListWidgetFromForeignKey

    v2 v3  
    11This recipe uses TurboGears SVN Revision 458 and SQLObject 0.7. 
    22 
    3 TurboGears includes a controller, turbogears.fastdata.DateController that takes an SQLObject class as an argument and produces a CRUD interface.  This recipe produces a select form element when it encounters a foreign key of a class with the form_option_value defined.  Included is the model and controllers you will need with code to create and populate the database tables.  You'll need to define your database info in dev.cfg.  Otherwise, it's batteries included. 
    4  
    5 I'm looking forward to making SQLObject and Turbogears work together and this is a good start. 
     3TurboGears includes a controller, turbogears.fastdata.DataController that takes an SQLObject class as an argument and produces a CRUD interface.  This recipe produces a select form element when it encounters a foreign key of a class with the form_option_value defined.  Included is the model and controllers you will need with code to create and populate the database tables.  You'll need to define your database info in dev.cfg.  Otherwise, it's batteries included. 
    64 
    75{{{ 
     
    1412from sqlobject.col import SOKeyCol 
    1513 
    16 hub = PackageHub("wiki20") 
     14hub = PackageHub("your_package") 
    1715__connection__ = hub 
    1816