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 #403 (closed defect: fixed)

Opened 13 years ago

Last modified 12 years ago

[PATCH][TEST] change the return on TurboKid.transform (from generator to Element)

Reported by: dwayne@… Owned by: anonymous
Priority: normal Milestone: 0.9
Component: TurboGears Version:
Severity: major Keywords: turbokid
Cc:

Description

Like explain in mailing list :  http://groups.google.com/group/turbogears/browse_thread/thread/9261cbd37f0dc85b/1c7447facc713ffb?lnk=raot

TurboKid?.transform doesn't return an ElementTree?.Element or a list/tuple of ElementTree?.Element but an iterator (item are a tuple (int, ElementTree?.Element) where int is a Kid code and the Element have no child).

The current return can't allow :

  • mixe beetween Widgets using various template engine,
  • display widgets using kid into page using an other template engine

Both justification are blocker for me!!!

The attached patch isn't optimised for the case engine and widget using kid, but it works (on my box).

Attachments

turbokid-transform.patch Download (724 bytes) - added by dwayne@… 13 years ago.
turbokid-elt.patch Download (2.3 KB) - added by anonymous 13 years ago.
turbokid-elt-tgtest.patch Download (1.1 KB) - added by anonymous 13 years ago.
update test of widgets

Change History

Changed 13 years ago by dwayne@…

comment:1 Changed 13 years ago by David Bernard <dwayne@…>

  • Component changed from Kid to TurboGears
  • Summary changed from [PATCH] change the return on TurboKid.transform (from generator to ElementTree) to [PATCH][TEST] change the return on TurboKid.transform (from generator to Element)

Complete rewrite of the patch and a little update of test_widget.

The patch seems compliant with current version (all tests run, quickstart run, toolbox run).

Result : the return of TurboKid?.transform and Widgets.insert is a string or an Element or a list of (string and Element). and str(Element) return the xml version of the Element. (this feature is due to usage of formencode.htmlgen instead of direct elementtree.ElementTree?, I could change this to remove the dependency to Formencode)

Changed 13 years ago by anonymous

Changed 13 years ago by anonymous

update test of widgets

comment:2 Changed 13 years ago by kevin

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

This has effectively been done with the latest widget updates.

Note: See TracTickets for help on using tickets.