On Aug 5, 2006, at 9:43 PM, Yves-Eric Martin wrote:

>
> Jorge Godoy wrote:
>> I also like more of this change (template for view and keeping  
>> @expose).  So I
>> change my vote. ;-)
>
>
> Glad to see @expose(view='...') is more popular the second time  
> around.

I should note that I was talking with Mark Ramm the other day about  
this, and his feeling was swayed by the fact that you don't even need  
to include the template= keyword. In fact, I've generally been doing  
that in my own code now. So, it would actually just look like:

@view("foo.bar.baz", content_type="dskfjksdf/sdfa", etc...)

Also, as to the "if it ain't broke don't fix it" argument: it's not  
that "expose" is a giant bit of breakage. It's just that MVC is not a  
term invented here and, since validation and error handling are split  
off in separate decorators, @view just feels, to me, like a better  
description of what that decorator has to say about a particular  
controller method (and, by association, URL).

That said, this is a pure bikeshed moment and I'm not willing to  
devote a lot of time to it. The crowd seems about 50/50, so at some  
point I'll likely just have to decide something one way or the other.

I do think people are right about a "views" directory (and json.py  
would go in there). That's probably not too onerous a change, because  
it wouldn't affect existing projects at all... it'd be a quickstart  
template change.

Thanks for all of the commentary on this. Feel free to continue if  
you've got something more to add or want to add a +1, -1.

Kevin

p.s.  we're nearing a deadline for the book. So, I'll definitely make  
a final choice in the next couple of days.


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