Replaced "print" with "self.stdout.write" 

This way, the output can be redirected via call_command:
https://docs.djangoproject.com/en/dev/ref/django-admin/#running-management-commands-from-your-code