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 #1114 (closed enhancement: worksforme)

Opened 13 years ago

Last modified 12 years ago

Optional parameter to the widget "Link" class to allow writing CSS/JSLinks to any directory.

Reported by: ajones Owned by: anonymous
Priority: low Milestone: 1.0b1
Component: TG Widgets Version: 0.9a5
Severity: minor Keywords:


The current implementation of the Link class mandates that CSS and JS Links must point to some subdirectory of "/tg_widgets/" in the domain. I would like to change this to allow Links to be defined within the project as well.

This could be accomplished by adding a new keyword parameter to Link.init that looks like this:


Then derive the link through string substitution.

Change History

comment:1 Changed 13 years ago by godoy

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

As explained on the mailing list, this is automatically created for you when you correctly package your widget. To have links inside the project itself you have to use the same structure but pointing to inside the project.

It works like you want today without anything special. You can check the docs and see how it should be done.

You're looking for the docs of pkg_resources and turbogears.widgets.register_static_directory.

I'm closing this as "worksforme" since it already works.

Note: See TracTickets for help on using tickets.