You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
451 B
14 lines
451 B
from django.core.management.base import BaseCommand
|
|
|
|
from common.utils.caches import add_user_ds
|
|
|
|
|
|
class Command(BaseCommand):
|
|
help = 'add user download times'
|
|
|
|
def add_arguments(self, parser):
|
|
parser.add_argument('uid', type=str, default='')
|
|
parser.add_argument('download_times', type=int, default=100)
|
|
|
|
def handle(self, *args, **options):
|
|
add_user_ds(options.get('uid', None), options.get('download_times', 100))
|
|
|