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

Opened 11 years ago

Last modified 10 years ago

tg.include_widgets doesn't work with toscawidgets

Reported by: alexbodn Owned by: faide
Priority: normal Milestone: 1.1.1
Component: TurboGears Version: 1.0.7
Severity: normal Keywords: needs confirmation

Description (last modified by Chris Arndt) (diff)

Ok, that would be an expected deprecation, but I'd preserve this feature, since not all "widgets" are really fields and depend on forms, but some have "view" functionality only.

The rendering process starts in turbogears/controllers.py, and should better be followed to see where should the included_widgets to be injected in order to enter the output stream.

A good debugging technique (more than print in the source) would greatly help.

best regards, alex

Change History

comment:1 Changed 11 years ago by faide

  • Milestone changed from 1.1 to 1.1 maintenance

comment:2 Changed 11 years ago by alexbodn

please pay attention: it works with usual widgets, but not with resources (like jslinks etc.) i don't know what the original intention was.


comment:3 Changed 10 years ago by Chris Arndt

  • Keywords needs confirmation added
  • Description modified (diff)
  • Milestone changed from 1.1.x bugfix to 1.1.1

We need a small example to confirm this.

comment:4 Changed 10 years ago by chrisz

I can confirm this issue. When I set

    toscawidgets.on = True
    tg.include_widgets = ['turbogears.mochikit', 'tw.jquery.jquery_js']

then only MochiKit will be injected, but not jQuery.

I have commited a simple fix in r6987.

comment:5 Changed 10 years ago by chrisz

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

Added unit test in r6988.

Note: See TracTickets for help on using tickets.