Re: Creating a list off a model based on time delta

2014-07-20 Thread Tomas Ehrlich
Use __gte lookup: latest_articles_list = Article.objects.filter(pub_date__gte=thirty_days_ago) and take a look at other lookups: https://docs.djangoproject.com/en/1.6/ref/models/querysets/#field-lookups Cheers, Tom Dne Sun, 20 Jul 2014 20:50:53 -0700 (PDT) Conner DiPaolo napsal(a): > I've b

Re: Creating a list off a model based on time delta

2014-07-20 Thread Conner DiPaolo
I've been thinking about it and I think this should work but it doesn't. latest_articles_list = Article.objects.filter(pub_date>=thirty_days_ago) Django is saying 'pub_date' is not defined, even though I used it to filter a different list and it worked fine. What is wrong?? Thanks On Sunday, J