Getting date from Django datetime field with F() expression
If you're looking to filter based on date, and your model has a DateTime field, you can simply use Django's __date lookup:
MyModel.objects.filter(last_updated__date=timezone.now().date()).update(...)
Also, as a general note, remember that your code's timezone behavior will affect comparisons between timestamps and dates (i.e. the same timestamp might correspond to different dates depending on which timezone is in use).
Lets say I have a Django model object that requires to update a particular field if the last_updated datetime field is equal to today's date. 
If I were to use F expression to avoid race condition, what would be the best way to compare the date from last_updated with current date using timezone.now().date()?