Re: Feature proposal: escape hatch for colliding template syntax in django templates

2010-10-19 Thread David Gouldin
Given 2 +1s, I've added a ticket: http://code.djangoproject.com/ticket/14502 On Oct 19, 6:49 pm, Jacob Kaplan-Moss wrote: > On Tue, Oct 19, 2010 at 12:24 PM, David Gouldin wrote: > > Thoughts/opinions? > > Looks like a good idea to me. I've certainly used ssi as a h

Feature proposal: escape hatch for colliding template syntax in django templates

2010-10-19 Thread David Gouldin
As client-side templates become more popular, it is increasingly likely that django's template language will not be the only one present in a template. (jQuery's new template language makes frequent use of curly braces in its syntax.) At the same time, the assumption that all template syntax shou

Feature request: coalesce for aggregates

2010-06-15 Thread David Gouldin
I would love to see the aggregate classes (Sum, Avg, etc) take an optional second parameter that becomes the value in a coalesce statement in the resulting query. Basically, this would function a lot like dict.get. Right now the only option is to resolve to None. If, for instance, you could say

Re: For QuerySet qs, list(qs)[k] does not always equal qs[k]

2009-04-24 Thread David Gouldin
There's a more subtle way to introduce the same bug. You can order on a field that is not unique and run into the same issue: an undefined return order due to duplicate values on the order column. On Apr 24, 9:14 am, Alex Gaynor wrote: > On Fri, Apr 24, 2009 at 10:09 AM, David Gouldi

For QuerySet qs, list(qs)[k] does not always equal qs[k]

2009-04-24 Thread David Gouldin
I've run into a bit of an odd problem with the ORM. I have a model without an order_by in its Meta. When I create a queryset and iter through it, I get the items in a sensical fashion. However, when I access the the queryset items by index (qs[0], qs[1], etc), not only do I get the items back i

RelatedManager.add fails silently when adding an object of the wrong type

2009-03-04 Thread David Gouldin
When trying to add an object of the wrong type using a related manager, Django fails silently rather than complaining as specified in the docs: http://docs.djangoproject.com/en/dev/topics/db/queries/#saving-foreignkey-and-manytomanyfield-fields I've created ticket #10413 and added a patch to add