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

Ticket #334 (closed enhancement: duplicate)

Opened 13 years ago

Last modified 12 years ago

[PATCH] formmaker support for ForeignKey columns

Reported by: alberto@… Owned by: anonymous
Priority: normal Milestone:
Component: CherryPy Version:
Severity: normal Keywords: SelectField ForeignKey formmaker fastdata


The following patch adds a SelectField? widget for every ForeignKey? column in an SQLObject. It populates it with all the possible choices for that column (selected from the other column). I'm not very confident with the way I pull the other column's class from the module in get_fk_join_options. It's possibly not the best way to do it, and not very portable either, as both classes need to live in the same module. It's the only way I could figure out though... it works for me but please feel free to improve.


formmaker-fk.patch Download (1.5 KB) - added by alberto@… 13 years ago.
The patch (NOTE: has #329 applied too)

Change History

Changed 13 years ago by alberto@…

The patch (NOTE: has #329 applied too)

comment:1 Changed 13 years ago by kevin

#362 has an alternative form

comment:2 Changed 13 years ago by kevin

  • Status changed from new to closed
  • Resolution set to duplicate

I'm going to close this one in favor of #362. I'm not sold on #362, though, so interested parties should look there and discuss further.

comment:3 Changed 13 years ago by kevin

  • Milestone 1.0 deleted
Note: See TracTickets for help on using tickets.