Previously, manage.py cleanfiles would give a warning about comparing naive datetimes with timezone-aware ones. It's actually possible that this would behave in unpredictable depending on local configuration and current timezone, but mostly warnings are annoying enough that it's always best to use django.utils.timezone.now() any time you're in Django-land.
Bonus changes: regroup & tidy up imports (I'm awful, I know) and fix some inconsistent indentation.
Previously,
manage.py cleanfiles
would give a warning about comparing naive datetimes with timezone-aware ones. It's actually possible that this would behave in unpredictable depending on local configuration and current timezone, but mostly warnings are annoying enough that it's always best to usedjango.utils.timezone.now()
any time you're in Django-land.Bonus changes: regroup & tidy up imports (I'm awful, I know) and fix some inconsistent indentation.