raise an CommandError exception with an argument string "couldn't handle %s template %s.", replace '%s' with self.app_or_project and template.
raise CommandError ( "couldn't handle %s template %s." % ( self . app_or_project , template ) )