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

Opened 13 years ago

Last modified 12 years ago

Let widgets support any template language supported by TG

Reported by: alberto Owned by: alberto
Priority: normal Milestone: 1.5
Component: TG Widgets Version:
Severity: normal Keywords:
Cc:

Description

Widgets should be able to be written in any template language supported by turbogears. It should be possible to mix Widgets written in different template languages freely.

Attachments

trunk.patch Download (15.6 KB) - added by alberto 13 years ago.
turbokid.patch Download (2.5 KB) - added by alberto 13 years ago.
trunk.2.patch Download (16.2 KB) - added by alberto 13 years ago.
markup.patch Download (1.3 KB) - added by alberto 13 years ago.

Change History

comment:1 Changed 13 years ago by alberto

The following patches against TG trunk and TurboKid? trunk are a beginning. All tests pass except a new one added which implements a widget in Cheetah. Unfortunately TurboCheetah? doesn't implement yet "load_string_template" so the tests raises a NotImplementedError?.

TurboKid? also needs to be patched with the accompanying patch which implements load_string_template.

TODO

  1. Patch markup to allow a template_string argument to load_template so it can load templates from a string.
  2. Do the same to TurboCheetah?
  3. Do the same to any TemplateEngine? that wants to be compatible with TG widgets.

Feedback much appreciated! :)

Alberto

Changed 13 years ago by alberto

Changed 13 years ago by alberto

Changed 13 years ago by alberto

Changed 13 years ago by alberto

comment:2 Changed 13 years ago by alberto

I've attached a patch for markup to load templates from a string and two new tests:

  • a markup TextField? widget.
  • mixing kid and markup widgets.

All tests are passing. :)

As a side note, this ticket should also close #830 (untested but pretty sure).

Alberto

comment:3 Changed 13 years ago by alberto

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

Comitted trunk.2.patch and turbokid.patch at [1875] and [1874]. Submitting markup.patch to Markup's Trac.

Note: See TracTickets for help on using tickets.