On Fri, Nov 20, 2009 at 2:47 AM, Andy McKay wrote:
> On 09-11-19 3:36 PM, Benjamin Wolf wrote:
...
>
> Try using values in the filter eg:
>
> Disposal.objects.values("mydate").filter(mydate__year__gte=2008).distinct()
>
> The problem is the default django query selects all the
On 09-11-19 3:36 PM, Benjamin Wolf wrote:
> I'm trying to create a select with the django query set which should
> give me the same result like this sql statement:
> SELECT distinct(YEAR(`mydate`)) FROM `table`
>
> I've tried it for a while but don't get it.
Try using values in the filter eg:
Hello,
I'm trying to create a select with the django query set which should
give me the same result like this sql statement:
SELECT distinct(YEAR(`mydate`)) FROM `table`
I've tried it for a while but don't get it.
Something like
self.fields['field'].choices = [('x', 'x') for disp in
3 matches
Mail list logo