Sorry, not sure about that warning because I'm using a postgresql database.
On Fri, Oct 15, 2010 at 3:17 AM, Marc Aymerich wrote:
>
>
> On Fri, Oct 15, 2010 at 3:39 AM, Alec Shaner wrote:
>>
>> You can't add a datetime to another datetime - you want to add a
>> datetime.timedelta instance instea
On Fri, Oct 15, 2010 at 3:39 AM, Alec Shaner wrote:
> You can't add a datetime to another datetime - you want to add a
> datetime.timedelta instance instead. Out of curiosity I just tested it
> on one of my models and it does work, e.g.,
>
> MyModel.objects.filter(update_date__gt=F('entry_date')+
You can't add a datetime to another datetime - you want to add a
datetime.timedelta instance instead. Out of curiosity I just tested it
on one of my models and it does work, e.g.,
MyModel.objects.filter(update_date__gt=F('entry_date')+timedelta(days=5))
On Thu, Oct 14, 2010 at 5:57 PM, Marc Aymer
On Thu, Oct 14, 2010 at 10:08 PM, Alec Shaner wrote:
> See this:
>
> http://ifacethoughts.net/2009/07/14/calculated-fields-in-django/
>
> So perhaps the 'extra' query filter is what you need.
>
>
Yep, I got a success using extra filter :) Thanks Alec for sharing this!
by the way, just right now
See this:
http://ifacethoughts.net/2009/07/14/calculated-fields-in-django/
So perhaps the 'extra' query filter is what you need.
2010/10/14 Marc Aymerich :
>
>
> 2010/10/14 Marc Aymerich
>>
>>
>> 2010/10/14 Jonathan Barratt
>>>
>>> On 14 ต.ค. 2010, at 22:27, Marc Aymerich wrote:
>>>
>>> Hi,
>>
2010/10/14 Marc Aymerich
>
>
> 2010/10/14 Jonathan Barratt
>
>> On 14 ?.?. 2010, at 22:27, Marc Aymerich wrote:
>>
>> Hi,
>> I'm trying to make a Manager for my model "order". I want that it returns
>> all orders that their 'active period'* is greater than a certain threshold.
>> With "active pe
2010/10/14 Jonathan Barratt
> On 14 ?.?. 2010, at 22:27, Marc Aymerich wrote:
>
> Hi,
> I'm trying to make a Manager for my model "order". I want that it returns
> all orders that their 'active period'* is greater than a certain threshold.
> With "active period" I mean: (order.cancel_date - order
2010/10/14 Jonathan Barratt
> On 14 ?.?. 2010, at 22:27, Marc Aymerich wrote:
>
> Hi,
> I'm trying to make a Manager for my model "order". I want that it returns
> all orders that their 'active period'* is greater than a certain threshold.
> With "active period" I mean: (order.cancel_date - order
On 14 ?.?. 2010, at 22:27, Marc Aymerich wrote:
> Hi,
> I'm trying to make a Manager for my model "order". I want that it returns all
> orders that their 'active period'* is greater than a certain threshold. With
> "active period" I mean: (order.cancel_date - order.register_date )
>
> My Order
Hi,
I'm trying to make a Manager for my model "order". I want that it returns
all orders that their 'active period'* is greater than a certain threshold.
With "active period" I mean: (order.cancel_date - order.register_date )
My Order model looks like this:
class order(models.Model):
register
10 matches
Mail list logo