wiki:ToolBox
Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Version 4 (modified by Philip Walls (turbogears@…, 13 years ago) (diff)

Better option for using toolbox remotely

ToolBox is a webbased collection of administration tools for your TurboGears applications. To run ToolBox, from the command line navigate to your project directory and call:

tg_admin toolbox

This will start ToolBox and load it in a new webbrowser window for you. By default ToolBox will run on port 7654. Currently ToolBox has 4 tools under it's belt:

  • CatWalk Model Browser. Administration tool for listing, creating, updating or deleting your SQLObject instances
  • WebShell? Interactive webbased Python interpreter
  • admi18n I18N administration tool. Collect your strings, add and manage locales, edit and compile you catalogs

Tools are regular TurboGears applications.

Connecting to the toolbox from other machines

Though as the manual says, you can access the server remotely on port 7654 by running tg-admin toolbox -n -c your.home.ip.here , I found that didn't work at all for accessing Catwalk, which *still* insisted I connect from localhost. The previous syntax was also somewhat irritating to me, since I'm on a DHCP connection that often changes IP address and had to keep looking it up.

The workaround I found was to just start up the toolbox as normal, (with

tg-admin toolbox -n &

to stop it opening a browser and then let me keep typing). Then, use  socat to set up a simple tunnel:

socat TCP4-LISTEN:9999,fork,reuseaddr TCP4:localhost:7654

I can now connect to  http://my.server:9999/ and use the toolbox. I had originally planned to use stunnel, but some of the AJAX components weren't designed to go over https, so plain unencrypted http will have to do. Note, of course, that anyone who connects to your server on port 9999 can now use the toolbox, so you probably don't want to leave socat running after you're done.

Note: you can also tell the toolbox to allow other IP addresses to connect by using the '-c' option, for example

tg-admin toolbox -n -c 10.0.0.2 -c 10.0.0.5

This example would allow both 10.0.0.2 and 10.0.0.5 to connect to the toolbox directly (on the default port). Note also that this will not open a web browser (due to using the -n option). You can get a list of all of the options available for the toolbox by typing:

tg-admin toolbox --help