django-codemod
django-codemod copied to clipboard
Codemodder: `QuerySet.earliest()` and `QuerySet.latest()`
trafficstars
Description
From Django 2.0 release notes:
The field_name keyword argument to
QuerySet.earliest()andQuerySet.latest()is deprecated in favor of passing the field names as arguments. Write.earliest('pub_date')instead of.earliest(field_name='pub_date').
This is removed in Django 3.0:
The
field_namekeyword argument ofQuerySet.earliest()andlatest()will be removed.