Management command borrowed from django-extensions