Ticket #42: migrate_verbosity_fix.patch

File migrate_verbosity_fix.patch, 1.0 KB (added by anonymous, 6 years ago)
  • management/commands/migrate.py

     
    2020        make_option('--db-dry-run', action='store_true', dest='db_dry_run', default=False, 
    2121            help="Doesn't execute the SQL generated by the db methods, and doesn't store a record that the migration(s) occurred. Useful to test migrations before applying them."), 
    2222    ) 
     23    if '--verbosity' not in [opt.get_opt_string() for opt in BaseCommand.option_list]: 
     24        option_list += ( 
     25            make_option('--verbosity', action='store', dest='verbosity', default='1', 
     26            type='choice', choices=['0', '1', '2'], 
     27            help='Verbosity level; 0=minimal output, 1=normal output, 2=all output'), 
     28        ) 
    2329    help = "Runs migrations for all apps." 
    2430 
    2531    def handle(self, app=None, target=None, skip=False, merge=False, only=False, backwards=False, fake=False, db_dry_run=False, **options):