results = Content.objects.filter(next_decay_at__lte=datetime.datetime.now())
results = Content.objects.filter(next_decay_at__lte=datetime.datetime.now())
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The query that did the ORM of Django is equivalent (Django got the datetime directly from Python) to:
NOW() is a SQL function that provide the actual datetime.
You can get more info at:
http://www.w3schools.com/sql/sql_func_now.asp