Update management commands

The old *args and **options syntax was generating deprecation errors
This commit is contained in:
Roland Geider
2016-09-18 15:21:53 +02:00
parent 9ebf3bbe07
commit f614de7301
11 changed files with 11 additions and 11 deletions

View File

@@ -58,7 +58,7 @@ class Command(BaseCommand):
help = 'Clears the application cache. You *must* pass an option selecting ' \
'what exactly you want to clear. See available options.'
def handle(self, *args, **options):
def handle(self, **options):
'''
Process the options
'''

View File

@@ -28,7 +28,7 @@ class Command(BaseCommand):
help = 'Deletes all temporary users older than 1 week'
def handle(self, *args, **options):
def handle(self, **options):
profile_list = UserProfile.objects.filter(is_temporary=True)
counter = 0

View File

@@ -31,7 +31,7 @@ class Command(BaseCommand):
help = 'Read out all strings that have to be included manually in the .po file'
def handle(self, *args, **options):
def handle(self, **options):
# Collect all translatable items
out = []

View File

@@ -29,7 +29,7 @@ class Command(BaseCommand):
'code used to calculate any of the cached entries is changed and ' \
'the ones in the database need to be updated to reflect the new logic.'
def handle(self, *args, **options):
def handle(self, **options):
'''
Process the options
'''

View File

@@ -26,7 +26,7 @@ class Command(BaseCommand):
Sends the prepared mass emails
'''
def handle(self, *args, **options):
def handle(self, **options):
'''
Send some mails and remove them from the list
'''

View File

@@ -53,7 +53,7 @@ class Command(BaseCommand):
' their UUID field, if you manually edited or changed it\n'
' the script will not be able to match them.')
def handle(self, *args, **options):
def handle(self, **options):
if not settings.MEDIA_ROOT:
raise ImproperlyConfigured('Please set MEDIA_ROOT in your settings file')

View File

@@ -27,7 +27,7 @@ class Command(BaseCommand):
help = 'Read out the user submitted exercise'
def handle(self, *args, **options):
def handle(self, **options):
exercises = Exercise.objects.accepted()
usernames = []

View File

@@ -28,7 +28,7 @@ class Command(BaseCommand):
'''
help = 'Check that all gym trainers and users have configurations'
def handle(self, *args, **options):
def handle(self, **options):
'''
Process all users
'''

View File

@@ -34,7 +34,7 @@ class Command(BaseCommand):
'''
help = 'Send out emails to trainers with users that have not shown recent activity'
def handle(self, *args, **options):
def handle(self, **options):
'''
Process gyms and send emails
'''

View File

@@ -35,7 +35,7 @@ class Command(BaseCommand):
help = 'Send out automatic email reminders for workouts'
def handle(self, *args, **options):
def handle(self, **options):
'''
Find if the currently active workout is overdue
'''

View File

@@ -35,7 +35,7 @@ class Command(BaseCommand):
help = 'Send out automatic emails to remind the user to enter the weight'
def handle(self, *args, **options):
def handle(self, **options):
profile_list = UserProfile.objects.filter(num_days_weight_reminder__gt=0)