mirror of
https://github.com/jazzband/django-avatar.git
synced 2026-03-16 22:20:30 +00:00
Fix for django >= 1.10
The class django.core.management.NoArgsCommand is removed.
This commit is contained in:
parent
e5d488a08d
commit
7f974b87c2
1 changed files with 3 additions and 3 deletions
|
|
@ -1,14 +1,14 @@
|
|||
from django.core.management.base import NoArgsCommand
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
from avatar.conf import settings
|
||||
from avatar.models import Avatar
|
||||
|
||||
|
||||
class Command(NoArgsCommand):
|
||||
class Command(BaseCommand):
|
||||
help = ("Regenerates avatar thumbnails for the sizes specified in "
|
||||
"settings.AVATAR_AUTO_GENERATE_SIZES.")
|
||||
|
||||
def handle_noargs(self, **options):
|
||||
def handle(self, *args, **options):
|
||||
for avatar in Avatar.objects.all():
|
||||
for size in settings.AVATAR_AUTO_GENERATE_SIZES:
|
||||
if options['verbosity'] != 0:
|
||||
|
|
|
|||
Loading…
Reference in a new issue