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 #2478 (closed enhancement: fixed)

Opened 9 years ago

Last modified 9 years ago

[PATCH] TG Widgets: Improve DataGrid widget, allow to use list/dict as value holders

Reported by: xaka Owned by: Chris Arndt
Priority: normal Milestone: 1.1.2
Component: TG Widgets Version: 1.1 HEAD
Severity: normal Keywords:


there is no way to redefine attrwrapper in child classes

class MyDataGrid(DataGrid):
  class attrwrapper(object): # i redefined it, but DataGrid.attrwrapper still in use

there is no way to use list/tuple or dict objects as value holders

grid = DataGrid(fields=[
  ('Field 1', 'key1'),
  ('Field 2', 'key2'),
  'key1' : 'val1',
  'key2' : 'val2'

# ===

grid = DataGrid(fields=[
  ('Field 1', 0),
  ('Field 2', 1),
  ('val1', 'val2'),
  ('val3', 'val4')

Patch and additional tests attached.

Ran 448 tests in 71.940s



turbogears.patch Download (4.2 KB) - added by xaka 9 years ago.

Change History

Changed 9 years ago by xaka

comment:1 Changed 9 years ago by chrisz

  • Milestone changed from __unclassified__ to 1.1.2

comment:2 Changed 9 years ago by chrisz

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

Thanks, applied in r7169. Sorry for the delay.

Note: See TracTickets for help on using tickets.