On Nov 18, 4:40 pm, Nathaniel Whiteinge <[EMAIL PROTECTED]> wrote:
> Out of curiosity, for those who want RequestContext added to
> render_to_response, is there a reason you don't like using
> direct_to_template instead?
Holy smokes, that thought never crossed my mind, despite using both
the
I understand about the loose coupling, but I think there is some
misunderstanding about the very nature of 'loosely coupled'. Coupling
has to do with *dependency*, not just utility. Adding a decoupled
method to the request is not a restrictive assumption, it is what it
is - a shortcut. No-one is
On Thu, Nov 20, 2008 at 10:23 PM, Yuri Baburov <[EMAIL PROTECTED]> wrote:
>
> On Thu, Nov 20, 2008 at 9:47 PM, Jeremy Dunck <[EMAIL PROTECTED]> wrote:
>>
>> On Thu, Nov 20, 2008 at 6:19 AM, zvoase <[EMAIL PROTECTED]> wrote:
>> ...
>>> # Using RequestContext
>>> def myview(request, *args):
>>>
On Thu, Nov 20, 2008 at 9:47 PM, Jeremy Dunck <[EMAIL PROTECTED]> wrote:
>
> On Thu, Nov 20, 2008 at 6:19 AM, zvoase <[EMAIL PROTECTED]> wrote:
> ...
>> # Using RequestContext
>> def myview(request, *args):
>># some code here...
>>request.render('template_name.html', {...})
> ...
>>
>>
On Thu, Nov 20, 2008 at 6:19 AM, zvoase <[EMAIL PROTECTED]> wrote:
...
> # Using RequestContext
> def myview(request, *args):
># some code here...
>request.render('template_name.html', {...})
...
>
> That just seems logical to me. Rather than (potentially) break
> backwards compatibility,
On Wed, Nov 19, 2008 at 4:10 AM, Nathaniel Whiteinge
<[EMAIL PROTECTED]> wrote:
>
> Out of curiosity, for those who want RequestContext added to
> render_to_response, is there a reason you don't like using
> direct_to_template instead? I see the two as being functionally
> equivalent (minus the
I have an idea which may solve the issue of render_to_response using a
RequestContext.
Why not have render_to_response as a shortcut in django.shortcuts (as
it is now), and then add a 'render' method to the request instance
which would do render_to_response but with a RequestContext instead.
That
Nathaniel Whiteinge wrote:
> Yes. It's built into Django and already does exactly what some people
> want render_to_response to do, so why all the hullabaloo? (Or am I
> still missing something?)
The problem here is for novice users. We have two things doing roughly
the same thing which is
On Tue, Nov 18, 2008 at 9:20 PM, Nathaniel Whiteinge
<[EMAIL PROTECTED]> wrote:
>
> On Nov 18, 5:43 pm, Ludvig Ericson <[EMAIL PROTECTED]> wrote:
>> Isn't that a generic view?
>
> Yes. It's built into Django and already does exactly what some people
> want render_to_response to do, so why all the
On Nov 18, 5:43 pm, Ludvig Ericson <[EMAIL PROTECTED]> wrote:
> Isn't that a generic view?
Yes. It's built into Django and already does exactly what some people
want render_to_response to do, so why all the hullabaloo? (Or am I
still missing something?)
On Tue, Nov 18, 2008 at 4:43 PM, Ludvig Ericson
<[EMAIL PROTECTED]> wrote:
> And that's very doable, and I'm with you on this. I hate having to
> pass context_instance. Long lines.
Although nothing stops someone from writing their own wrapper if they
don't like direct_to_template for some reason
> Then why not just change the docs/tutorial to use or mention
> direct_to_template instead?
>
> Granted, there is a bit of momentum behind render_to_response, but if
> the docs are changed it will just be the status quo until that time
> people start catching on to the simpler method.
Isn't
On Tue, Nov 18, 2008 at 5:40 PM, Nathaniel Whiteinge
<[EMAIL PROTECTED]> wrote:
>my Python-foo is not strong, is there a reason I should
> avoid using direct_to_template in 99% of my views?
I think if people are already using RequestContext 99% of the time,
then render_to_response should
Out of curiosity, for those who want RequestContext added to
render_to_response, is there a reason you don't like using
direct_to_template instead? I see the two as being functionally
equivalent (minus the addition of RequestContext, of course), but this
debate crops up every so often -- is there
Adrian Holovaty wrote:
> Yuri, to answer your question: I try never to send the request object
> into a template context
Uhm... But using RequestContext is not about it. Everyone I know uses
RequestContext almost exclusively (i.e. nobody uses standard
render_to_response with plain Context
On Tue, Nov 18, 2008 at 12:42 AM, James Bennett <[EMAIL PROTECTED]> wrote:
> On Tue, Nov 18, 2008 at 12:04 AM, Yuri Baburov <[EMAIL PROTECTED]> wrote:
>> I'm always wondeing how it's possible that Django creators don't use
>> django in ways that are written in django documentation. That leads to
For all three of our projects in django, we've gone through and used our own
exended version of render_to_response, which uses RequestContext by default.
Its such a blessing.
On Tue, Nov 18, 2008 at 7:42 PM, James Bennett <[EMAIL PROTECTED]>wrote:
>
> On Tue, Nov 18, 2008 at 12:04 AM, Yuri
On Tue, Nov 18, 2008 at 12:04 AM, Yuri Baburov <[EMAIL PROTECTED]> wrote:
> I'm always wondeing how it's possible that Django creators don't use
> django in ways that are written in django documentation. That leads to
> misunderstanding in expectations, and should explain why some tickets
> don't
18 matches
Mail list logo