Hi,
On Oct 30, 2006, at 11:31 AM, Diez B. Roggisch wrote:
> (...)
> Of course I can create a new webapplication just for testing my widget
> project. But first of all, the toolbox widget list mechanisms
> already _allow_
> for convenient, self-embedded rendering. There is everything available
> already. And as my answer to my own post says, obviously somebody
> also felt
> the need to restrict the display of widgets to just one. And
> second, it would
> render the whole approach somewhat moot if I need a special webapp
> to test a
> widget, then I'd just go for the webapp.
>
> Beside that, both approaches won't help with the
> reloading-on-code-change-issue, if I'm not mistaken. Because a type
> tgwidget-application is basically a deployed egg, and just as
> touching any
> file in the python distro doesn't trigger a reload, changing the
> egg-contents
> won't do that as well (unless one takes special measures).
>
> To summarize: I think having a convenient testbed for widget
> development would
> be a good idea. I don't care too much about where it lives, but if
> it _is_
> integrated in the toolbox, the advantage to me clearly is that a
> developer is
> more encouraged to package her widget to be usable out-of-the-box.
When developing a widget I usually create a widget egg skeleton with
"tg-admin quickstart -tgwidget", quickstart a new app and set
"autoreload.package" to a blank value so it autoreloads whenever any
module is modified. If you install the widget dist. in develop mode
(python setup.py develop) the app will reload whenever your edit the
widget's sources (or anything imported by your app) without needing
to install it.
I personally see the widget browser as a "show-case" for widgets you
plan to distribute (to free your users from repeating those steps and
to provide some documentation) and I only write a WidgetDesc once the
widget is ready.
On the other hand, an autoreloading toolbox would be cool, those easy
steps are still time consuming... However, I've tried to patch the
toolbox to autoreload like a quickstarted app does but it crashed
crashed when launched:
Index: turbogears/command/base.py
===================================================================
--- turbogears/command/base.py (revision 1996)
+++ turbogears/command/base.py (working copy)
@@ -307,7 +307,8 @@
"server.socket_port" : self.port,
"server.environment" : "development",
"server.log_to_screen" : True,
- "autoreload.on" : False,
+ "autoreload.on" : True,
+ "autoreload.package" : "",
"server.package" : "turbogears.toolbox",
"log_debug_info_filter.on" : False,
"identity.failure_url" : "/noaccess"
If anyone comes up with a solution that works I'm +1 for it if no
other nasty-side effects are caused.
Alberto
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---