Michele Cella wrote:
> what a great news IMHO, that's a really needed thing for TG thanks to
> you and your company for a great piece of software.
>
> It looks very professional (looking at the shots) and the source code
> is quite clean and a nice example of how a real TG project should  
> look.

Thanks for the complements!  I wrote this a while back, and I was  
definitely still learning a lot about TurboGears, so I was hoping  
that there weren't too many shameful mistakes in the code ;)

Now, I am well-versed in 0.8, but still catching up to 0.9.  There  
have been so many changes and improvements that its hard to keep up  
with them all!

> Just two things I noticed after a first look at the source code:
>
> 1) in 0.9 you can use:
>
> raise tg.redirect('/dashboard')
>
> instead of
>
> raise http.HTTPRedirect(url('/dashboard'))

Thanks, I just fixed this in changeset 88.  This should make me more  
"futureproof" in case First Class goes to RhubartTart, or something  
else entirely.

> 2) widgets:
> <a whole slew of great suggestions>

I got started on something to handle this in changeset 87.  At the  
very least, I am not using the wonky "ContainedWidget" stuff anymore,  
and I am not overriding __init__ anymore.

Now, it seems that I am supposed to be able to share instances of a  
widget.  I haven't done this part yet, because I want to make sure I  
understand.  Basically, I should be able to do something like this:

In the controller:

     risk_widget = RiskWidget()

     @expose(template='mytemplate')
     def do_thing(self):
        return dict(risk_widget=risk_widget)

In the template:

     <span py:for="risk in risks">
         ${risk_widget.update_data(risk=risk).display()}
     </span>

... is this correct?  I want to make sure I get this right before I  
make a change.  Of course, I would also just accept a patch to answer  
my question ;)

Thanks for all the feedback!

--
Jonathan LaCour
http://cleverdevil.org



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to