2016-05-09 15:35:13 +03:00

14 lines
376 B
Python

from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
from hc.accounts.models import Profile
class Command(BaseCommand):
help = 'Make sure all users have profiles'
def handle(self, *args, **options):
for user in User.objects.all():
Profile.objects.get_or_create(user_id=user.id)
print("Done.")