Re: Why does transaction management only commit on is_dirty?

2010-10-22 Thread Christophe Pettus
On Oct 22, 2010, at 4:01 PM, Jacob Kaplan-Moss wrote: > It's a bug: http://code.djangoproject.com/ticket/9964. > > Looks like the patch there is OK, but still needs some work (there's a > couple of TODOs still). On it! :) -- -- Christophe Pettus x...@thebuild.com -- You received this messa

Re: Why does transaction management only commit on is_dirty?

2010-10-22 Thread Alex Gaynor
On Fri, Oct 22, 2010 at 7:01 PM, Jacob Kaplan-Moss wrote: > On Fri, Oct 22, 2010 at 5:59 PM, Christophe Pettus wrote: >> Why does transaction management only commit on is_dirty? > > It's a bug: http://code.djangoproject.com/ticket/9964. > > Looks like the patch there is OK, but still needs some w

Re: Why does transaction management only commit on is_dirty?

2010-10-22 Thread Jacob Kaplan-Moss
On Fri, Oct 22, 2010 at 5:59 PM, Christophe Pettus wrote: > Why does transaction management only commit on is_dirty? It's a bug: http://code.djangoproject.com/ticket/9964. Looks like the patch there is OK, but still needs some work (there's a couple of TODOs still). Jacob -- You received this

Why does transaction management only commit on is_dirty?

2010-10-22 Thread Christophe Pettus
Why does transaction management only commit on is_dirty? I realize that the answer to this question is, "Why commit if there are no changes to the database?", but it's a bit more complicated than that. Let's assume a reasonably common case: 1. psycopg2 + PostgreSQL. 2. Transaction middleware en

Re: Using jQuery.noConflict() instead of jQuery.noConflict(true) in contrib.admin

2010-10-22 Thread Chuck Harmston
A good Moreover I wont' be able to use any jQuery plugin (that directly > references `jQuery`) in the admin (without hacking with > ModelAdmin._media), because the `jQuery` object does not exist. I am > forced to include jquery twice ... Per the jQuery docs

Re: Gentle Proposal: add 'render' shortcut in 1.3

2010-10-22 Thread Mikhail Korobov
Hi Chris, I don't see anything harmful neither in django.contrib.messages.middleware.MessageMiddleware nor in django.test.testcases.assertContains. Messages middleware passes response as-is and assertContains reads 'content' attribute and thus forces the baking. at lest the following test case fo

Re: Gentle Proposal: add 'render' shortcut in 1.3

2010-10-22 Thread SmileyChris
In my use of TemplateResponse in a real project, we encountered two gotchas that I can think of off the top of my head: 1. You need to explicitly bake the response if you are testing using assertContains 2. You need to explicitly bake the response before the contrib.messages middleware On Oct 23,

Using jQuery.noConflict() instead of jQuery.noConflict(true) in contrib.admin

2010-10-22 Thread tyrion-mx
1) contrib.admin places jQuery in its own namespace `django.jQuery`. In this way other jQuery instances should not conflict with it. 2) It also removes the dollar sign AND the `jQuery` object from the global scope. *I think* removing the `jQuery` object is not necessary because it *should* not con

Re: #13717: What to do next?

2010-10-22 Thread Jacob Kaplan-Moss
On Fri, Oct 22, 2010 at 11:21 AM, Silvio wrote: > I opened ticket #13717, and it seems to be reproducible by other > people. Someone contributed a patch, but the ticket is "stuck" because > it needs tests. > > I would really like to see this fixed by 1.3, so I'd be more than > happy to write these

#13717: What to do next?

2010-10-22 Thread Silvio
Hey guys, I opened ticket #13717, and it seems to be reproducible by other people. Someone contributed a patch, but the ticket is "stuck" because it needs tests. I would really like to see this fixed by 1.3, so I'd be more than happy to write these and submit them. But I'm not sure in which file

Re: contrib.staticfiles app concerns

2010-10-22 Thread Tom Evans
On Thu, Oct 21, 2010 at 9:04 PM, Jacob Kaplan-Moss wrote: > On Thu, Oct 21, 2010 at 1:25 PM, Waldemar Kornewald > wrote: >> Thanks a lot for the clarification. So, then the "bad batteries" part >> in Eric's talk "Why Django sucks and how we can fix it" doesn't >> receive much agreement within the

Re: Gentle Proposal: add 'render' shortcut in 1.3

2010-10-22 Thread Russell Keith-Magee
On Fri, Oct 22, 2010 at 7:32 PM, Mikhail Korobov wrote: > Russell's comments were helpful in discovering the edge case. > _set_content behaves differently for baked and non-baked responses: > > response = render(request, Template('foo')) > response.content = 'bar' > print response.content    # 'fo

Re: Gentle Proposal: add 'render' shortcut in 1.3

2010-10-22 Thread Russell Keith-Magee
2010/10/22 Łukasz Rekucki : > On 22 October 2010 03:59, Russell Keith-Magee wrote: >> 2010/10/21 Łukasz Rekucki : >>> On 20 October 2010 21:57, Jacob Kaplan-Moss wrote: 2010/10/20 Mikhail Korobov : > There is an unresolved question in the ticket: "The only hesitation is > the relatio

Re: Gentle Proposal: add 'render' shortcut in 1.3

2010-10-22 Thread Łukasz Rekucki
On 22 October 2010 03:59, Russell Keith-Magee wrote: > 2010/10/21 Łukasz Rekucki : >> On 20 October 2010 21:57, Jacob Kaplan-Moss wrote: >>> 2010/10/20 Mikhail Korobov : There is an unresolved question in the ticket: "The only hesitation is the relationship with #12815; we should resolv

Re: Gentle Proposal: add 'render' shortcut in 1.3

2010-10-22 Thread Mikhail Korobov
Russell's comments were helpful in discovering the edge case. _set_content behaves differently for baked and non-baked responses: response = render(request, Template('foo')) response.content = 'bar' print response.content# 'foo' response.content = 'baz' print response.content# 'baz' This

csrf_token on 404 page

2010-10-22 Thread Gert Van Gool
I'm unsure whether this is a bug or not. So I'm checking here first. But it seems impossible to use {% csrf_token %} on a 404 page? On a 500 page, it's works though. -- Gert Mobile: +32 498725202 Twitter: @gvangool Web: http://gert.selentic.net -- You received this message because you are subsc