Use Django's atomic when available.