A sample TG2 application: ToolBox2 ?!

3 views
Skip to first unread message

gas...@gmail.com

unread,
Jul 6, 2007, 2:48:55 AM7/6/07
to TurboGears Trunk
> Mark Ramm:
> But before we do an alpha we need a sample TG2 application to show
> off, and a bit of documentation. We also need to further test our
> object dispatch system, and write quite a few more tests. I'm sure
> there are other thnings that need to be done before the 2.0 alpha, so
> let's put them all into Trac with a 2.0 target so we can keep track of
> all of them.
>

Hi, I've import ToolBox2 info svn as a standalone project.

ToolBox2 is the original Turbogears toolbox doing TG2's way.

1. It's a tg2 project. so it's WSGI compatible.
2. It is plugable with entrypoint "turbogears2.toolboxcommand" (was
"turbogears.toolboxcommand")
3. it could be triggered with 'paster toolbox' command (was tg-admin
toolbox)
4. ToolBox2 gadgets are able to be listed by 'paster tginfo' command

Just like Toolbox1, Each gadgets is the ideal TG2 controller with some
extra attributes,
so write a gadget is as easy as writing normal TG2 apps.


Currently 2 gadgets are available:

1. tginfo gadget
web version 'paster tginfo'
2. tbapi
Toolbox's api doc (in dev version you have to generate api by
epydoc first)


Hope it could be shipped with TG2 someday.

gas...@gmail.com

unread,
Jul 6, 2007, 3:14:15 AM7/6/07
to TurboGears Trunk
At this time two things block the toolbox app development:

1. object dispatch doesn't dispatch objects which is set through
setattr() method.

ex:

which works::

info = Info()

which not work::

setattr(self, info, Info() )

it will fail in display.


2. ToscaWidget integration
http://trac.turbogears.org/ticket/1426

Any quick instruction will be appreciated, widgets make me lazy to
coding plain forms :)

--
Fred

Mark Ramm

unread,
Jul 15, 2007, 8:49:29 PM7/15/07
to turbogea...@googlegroups.com
Could this be because TG2 controllers are instantiated once per request?

Also, could the new lookup functionality of the TG controllers replace
the need for this setattr trick?

--Mark Ramm


--
Mark Ramm-Christensen
email: mark at compoundthinking dot com
blog: www.compoundthinking.com/blog

gas...@gmail.com

unread,
Jul 15, 2007, 11:45:11 PM7/15/07
to TurboGears Trunk
> Could this be because TG2 controllers are instantiated once per request?
>
> Also, could the new lookup functionality of the TG controllers replace
> the need for this setattr trick?
>

Yes, lookup rocks :D

lookup is definitely better than the setattr trick :)

Now the toolbox app works well on tg2.


Any suggestion for new gadgets?

--
Fred

Reply all
Reply to author
Forward
0 new messages