Ticket #11590: LabelCommand_default_label.diff
File LabelCommand_default_label.diff, 692 bytes (added by , 15 years ago) |
---|
-
django/core/management/base.py
312 312 """ 313 313 args = '<label label ...>' 314 314 label = 'label' 315 default_label = None 315 316 316 317 def handle(self, *labels, **options): 317 318 if not labels: 318 raise CommandError('Enter at least one %s.' % self.label) 319 if not self.default_label: 320 raise CommandError('Enter at least one %s.' % self.label) 321 else: 322 labels = [self.default_label] 319 323 320 324 output = [] 321 325 for label in labels: