raise a exception of CommandError class, with string "App '%s' does not have migrations" with '%s' replaced with app_label as the argument.
raise CommandError ( "App '%s' does not have migrations" % app_label )