A few minor 0.9 changes that will break existing 0.9 projects unless  
you make small accommodations.

First, to avoid any breakage, in yourproj/lib/base.py, change  
response -> Response, then add:
response = Response

I am going back to Response, and sticking with it. This is mainly  
because now that there are no _fragment methods, its just:
render, render_response, Response

I believe this reduces the visual in-coherency that was present  
before with the extra 'response' functions.

Response is a clear sign you are not dealing with an instance/object,  
but a class/factory and are instantiating an object, not just making  
a function call. If you really want to use lowercase, feel free to do  
so in your own project.

There are now two additional methods you can import in your lib/base.py:
from pylons.helpers import abort, redirect_to

Here's the function header for abort which should explain its purpose:
def abort(status_code=None, detail="", headers=None, comment=None):
     """Aborts the request immediately by returning an HTTP exception

     In the event that the status_code is a 300 series error, the detail
     attribute will be used as the Location header should one not be  
specified
     in the headers attribute.

This is similar to the m.abort, and will immediately cease execution  
to return with the code of your choice. The concept being that  
helpers under h. are intended primarily/solely for use in your  
templates, while functions for your controllers should be imported  
like any normal Python module/function.

I'm cleaning a few other things that should have negligible effect if  
any tonight as well in advance of a 0.9 release.

Cheers,
Ben

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss
-~----------~----~----~----~------~----~------~--~---

Reply via email to