Make it possible to fully delete unlisted/unrated extensions #81
@ -1,3 +1,4 @@
|
||||
import logging
|
||||
import random
|
||||
|
||||
from django.core.management.base import BaseCommand
|
||||
@ -61,6 +62,15 @@ class Command(BaseCommand):
|
||||
help = 'Generate fake data with extensions, users and versions using test factories.'
|
||||
|
||||
def handle(self, *args, **options):
|
||||
verbosity = int(options['verbosity'])
|
||||
root_logger = logging.getLogger('root')
|
||||
if verbosity > 2:
|
||||
root_logger.setLevel(logging.DEBUG)
|
||||
elif verbosity > 1:
|
||||
root_logger.setLevel(logging.INFO)
|
||||
else:
|
||||
root_logger.setLevel(logging.WARNING)
|
||||
|
||||
tags = {
|
||||
type_id: list(Tag.objects.filter(type=type_id).values_list('name', flat=True))
|
||||
for type_id, _ in Extension.TYPES
|
||||
|
Loading…
Reference in New Issue
Block a user