updateranks.py 480 B

123456789101112
  1. from django.core.exceptions import ValidationError, NON_FIELD_ERRORS
  2. from django.core.management.base import BaseCommand, CommandError
  3. from django.utils import timezone
  4. from optparse import make_option
  5. class Command(BaseCommand):
  6. """
  7. This command is intended to work as CRON job fired of once per day or less if you have more users.
  8. """
  9. help = 'Updates users ranking'
  10. def handle(self):
  11. self.stdout.write('Users ranking has been updated.\n')