Make the script compatible with django management.