Re: websockets

2013-04-17 Thread ptone
On Wednesday, April 17, 2013 2:31:48 AM UTC-7, Aymeric Augustin wrote: > > 2013/4/17 Daniel Swarbrick > >> On the pure Django side of things, one of the challenges I encountered >> was "IDLE IN TRANSACTION" hanging DB connections in the long-running >> WebSocket views.

Re: A second stab at an implementation of composite fields

2013-04-17 Thread Michal Petrucha
On Wed, Apr 17, 2013 at 03:49:11AM -0700, Anssi Kääriäinen wrote: > The basic idea is that there is a new ForeignObject class. A > ForeignObject basically just takes a related model, and from_fields > and to_fields which are the names of the fields used for the relation. > Then, the ORM knows how

Re: Proposal: Redefine specific {% block %} in an intermediate template

2013-04-17 Thread Emil Stenström
Carl Meyer skrev 2013-04-18 00:09: Hi Emil, On 04/17/2013 04:00 PM, Emil Stenström wrote: Carl Meyer skrev 2013-04-17 18:37: Why not instead add a new block to base.html? So you'd change base.html to have: {% block outer-content %} {% block content %}{% endblock content %} {% endblock

Re: Proposal: Redefine specific {% block %} in an intermediate template

2013-04-17 Thread Carl Meyer
Hi Emil, On 04/17/2013 04:00 PM, Emil Stenström wrote: > Carl Meyer skrev 2013-04-17 18:37: >> Why not instead add a new block to base.html? So you'd change base.html >> to have: >> >> {% block outer-content %} >> {% block content %}{% endblock content %} >> {% endblock outer-content %} >> >> And

Re: Proposal: Redefine specific {% block %} in an intermediate template

2013-04-17 Thread Emil Stenström
Andrew Ingram skrev 2013-04-17 18:08: I've been wanting this exact feature for years. I've always struggled to explain the problem, but I've had numerous cases where this would have made for a vastly simpler template structure. Big +1 from me. Since there are a couple of -1:s on this. Would

Re: Proposal: Redefine specific {% block %} in an intermediate template

2013-04-17 Thread Emil Stenström
Carl Meyer skrev 2013-04-17 18:37: Why not instead add a new block to base.html? So you'd change base.html to have: {% block outer-content %} {% block content %}{% endblock content %} {% endblock outer-content %} And base_with_warning.html: {% extends "base.html" %} {% block outer-content %}

Re: Proposal: Redefine specific {% block %} in an intermediate template

2013-04-17 Thread Emil Stenström
Jacob Kaplan-Moss skrev 2013-04-17 18:36: On Wed, Apr 17, 2013 at 10:50 AM, Emil Stenström wrote: {% extends "base.html" %} {% block content %} Be careful when changing these settings! {% block content %}{% endblock %} {% endblock %} I find this intensely confusing --

RE: Proposal: Redefine specific {% block %} in an intermediate

2013-04-17 Thread Babatunde Akinyanmi
template MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable +1 for being confusing Sent from my Windows Phone From: Carl Meyer Sent: 4/17/2013 5:37 PM To: django-developers@googlegroups.com Subject: Re: Proposal: Redefine specific {% block %}

Re: Proposal: Redefine specific {% block %} in an intermediate template

2013-04-17 Thread Carl Meyer
Hi Emil, On 04/17/2013 09:50 AM, Emil Stenström wrote: > Proposal: > Make it possible to use the same template block name twice, if the > second one is nested within the first one. Inheriting from the template > fills in the innermost block. This is an interesting proposal, but I am concerned

Re: Proposal: Redefine specific {% block %} in an intermediate template

2013-04-17 Thread Jacob Kaplan-Moss
On Wed, Apr 17, 2013 at 10:50 AM, Emil Stenström wrote: > {% extends "base.html" %} > {% block content %} > Be careful when changing these settings! > {% block content %}{% endblock %} > {% endblock %} I find this intensely confusing -- I can't build a mental model of what's

Re: Proposal: Redefine specific {% block %} in an intermediate template

2013-04-17 Thread Andrew Ingram
I've been wanting this exact feature for years. I've always struggled to explain the problem, but I've had numerous cases where this would have made for a vastly simpler template structure. Big +1 from me. On 17 April 2013 16:50, Emil Stenström wrote: > Hi, > > Proposal: > Make

Proposal: Redefine specific {% block %} in an intermediate template

2013-04-17 Thread Emil Stenström
Hi, Proposal: Make it possible to use the same template block name twice, if the second one is nested within the first one. Inheriting from the template fills in the innermost block. -- Background (why is this useful?): Say you have one base.html template defining a {%

Re: [GSoC 2013] Revamping validation functionality proposal

2013-04-17 Thread Jacob Kaplan-Moss
Hi Christopher - Thanks for the proposal, this is quite good. I really appreciate the detail; it's clear you've put a lot of thought into this. In general, I think this is a strong proposal and one I'd support. However, I do have some comments/feedback: 1. We've had some discussions about

Re: A second stab at an implementation of composite fields

2013-04-17 Thread Anssi Kääriäinen
On 12 huhti, 18:34, Michal Petrucha wrote: > On Fri, Apr 12, 2013 at 07:35:45AM -0700, Anssi Kääriäinen wrote: > > On 12 huhti, 16:44, Michal Petrucha wrote: > > ForeignKeys have been changed a lot since 2012-11-04. The introduction > > of

Re: first() and last(), earliest() and latest()

2013-04-17 Thread Anssi Kääriäinen
On 28 helmi, 01:34, Wim Feijen wrote: > Hi all, > > We struggled to get a proper definition for a first() and last() method vs. > earliest() and latest() . I'd like to make one proposal. After that, I > really like your opinion on which syntax you prefer. > > First, let me give

Re: websockets

2013-04-17 Thread Aymeric Augustin
2013/4/17 Daniel Swarbrick > On the pure Django side of things, one of the challenges I encountered was > "IDLE IN TRANSACTION" hanging DB connections in the long-running WebSocket > views. I really ought to research a more elegant solution to this, but for > now I'm

Re: websockets

2013-04-17 Thread Daniel Swarbrick
On Wednesday, April 17, 2013 8:10:15 AM UTC+2, Aymeric Augustin wrote: > > > Yes, that's why https://github.com/aaugustin/django-c10k-demo/ builds > upon Tulip. > > Unfortunately, that choice makes it unsuitable for inclusion in Django > until we drop support for Python 3.3 and all earlier

Re: websockets

2013-04-17 Thread Aymeric Augustin
On 16 avr. 2013, at 23:03, Jonathan Slenders wrote: > Maybe it's worth noting that Guido is working on a Tulip, a specification for > an asynchronous API in Python 3, this to get some consensus. Right now, there > is almost zero compatibility between al the