On Jun 16, 4:45 pm, Ben Firshman <b...@firshman.co.uk> wrote:
>
> The request is passed round so methods look like views to decorators. 
> Magically dropping it for decorators seems a bit scary. :/
>

The way I see it a good framework need to establish a clear contract
with its user. In our case, Django publishes a contract ensuring the
user that when he inherits from View and overrides any of: GET, POST,
UPDATE, DELETE,get_response, get_content, get_resource, render_html,
get_template, get_context and a few others, the request attribute of
self is current.

I agree stripping the request looks a bit scary, but at least it's
only 5 lines of simple code:-). They way I see it,  decorators are
global so they need the request and Django adds it for them. When the
global decorators are done, Django can strip the request and get the
user to trust our contract.

Benny.






-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to