Re: [GSOC] Query Refactor List Field

2010-07-22 Thread Russell Keith-Magee
On Fri, Jul 23, 2010 at 4:37 AM, Alex Gaynor wrote: > Hey all, > > As I said in my last update, this week I've been working on some > ListField stuff.  So far I have a basic ListField implemented, with a > syntax of models.ListField(models.IntegerField()).  However, there are > a number of questio

Re: [GSOC] Query Refactor List Field

2010-07-22 Thread Josh Ourisman
Awesome! I've been really enjoying playing around with your code so far—I'm actually building a small project off of it for fun—and the addition of ListFields has been one of the things I've been waiting for. Embedded documents is definitely also high on my list. 1) It would be awesome to have Lis

[GSOC] Query Refactor List Field

2010-07-22 Thread Alex Gaynor
Hey all, As I said in my last update, this week I've been working on some ListField stuff. So far I have a basic ListField implemented, with a syntax of models.ListField(models.IntegerField()). However, there are a number of questions that have cropped up: 1) Should support for PostgreSQL (and

Re: New context template tag

2010-07-22 Thread Gregor Müllegger
I'm a huge fan of Alex Gaynor's templatetag sugar syntax for defining template tags: # from the docs: @tag(register, [Constant("for"), Variable(), Optional([Constant("as"), Name()])]): def example_tag(context, val, asvar=None): if asvar: context[asvar] = val return "" else

Re: New context template tag

2010-07-22 Thread Alex Robbins
Eric, Thanks for the reply! django-template-utils does help some but, like you say, you still end up writing a function and a custom node. Is there a reason we couldn't add another template tag helper like simple_tag or inclusion_tag? (I'll write the code and tests) Adding to context seems (to me

Re: MySQL index hints

2010-07-22 Thread Alex Gaynor
On Thu, Jul 22, 2010 at 12:59 PM, Santiago Perez wrote: >> I'd be happy to use raw(); but then you lose len(), slicing, >> pagination, filter chaining, etc. My problem came about because admin >> change lists were unusably slow on large tables. With_hints allowed a >> simple monkey patch to admin,

Re: MySQL index hints

2010-07-22 Thread Santiago Perez
> I'd be happy to use raw(); but then you lose len(), slicing, > pagination, filter chaining, etc. My problem came about because admin > change lists were unusably slow on large tables. With_hints allowed a > simple monkey patch to admin, dropping 2s per page down to ~0.01s. How about a raw_hints(

Re: New context template tag

2010-07-22 Thread Eric Holscher
I usually use James Bennett's django-template-utils for this purpose. It has a nice, simple implementation: http://bitbucket.org/ubernostrum/django-template-utils/src/tip/template_utils/nodes.py#cl-11 It still requires the annoying Node/function split though. I know there have been a multitude o

New context template tag

2010-07-22 Thread Alex Robbins
I am a huge fan of simple_tag and inclusion_tag. They take a common template tag use case and make it very easy to write. It seems like a common use case that isn't represented is adding a value to context. I find myself writing tags to add a variable to context very often and it seems like we shou

Re: memcached-based-cache - timeout=0 does not work as intended by memcached

2010-07-22 Thread Will Hardy
I thought this was familiar too: Is this the ticket you were thinking of? It seems to have been reopened. Cheers, Will Hardy -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this grou

Re: proposal: abstract file upload/download handling

2010-07-22 Thread Waldemar Kornewald
On Thu, Jul 22, 2010 at 4:30 AM, Russell Keith-Magee wrote: > On Sun, Jul 18, 2010 at 1:59 AM, Waldemar Kornewald > wrote: >> Hi Russell, >> so, after our chat on IRC I've finally found the time to implement a >> real proposal including unit tests. I've attached the patch to this >> ticket: >> ht