You should probably use self.stdout.write instead of print here. This allows someone who calls this command to redirect the stdout to a variable in memory for example