from django.core.management.base import BaseCommand, CommandError
from django.contrib.auth.models import User
from users.models import Profile

class Command(BaseCommand):
    help = 'Links users with users profiles'

    def add_arguments(self, parser):
        # parser.add_argument('poll_ids', nargs='+', type=int)
        pass

    def handle(self, *args, **options):
        pCount = Profile.objects.count()
        uCount = User.objects.count()
        print("Profiles: {} Users: {}".format(pCount,uCount))
        if uCount > pCount:
            users = User.objects.exclude(profile__user__in=User.objects.all())
            for user in users:
                print("Creating profile for user: "+str(user))
                profile = Profile.objects.create(
                    bio = "",
                    user = user,
                )

        else:
            print("The number of users and profiles is the same")
08b1d4916dccc90d6ddebcebae6a085a22ab2e92
<mask token>


class Command(BaseCommand):
    <mask token>
    <mask token>
    <mask token>

<mask token>


class Command(BaseCommand):
    <mask token>
    <mask token>

    def handle(self, *args, **options):
        pCount = Profile.objects.count()
        uCount = User.objects.count()
        print('Profiles: {} Users: {}'.format(pCount, uCount))
        if uCount > pCount:
            users = User.objects.exclude(profile__user__in=User.objects.all())
            for user in users:
                print('Creating profile for user: ' + str(user))
                profile = Profile.objects.create(bio='', user=user)
        else:
            print('The number of users and profiles is the same')

<mask token>


class Command(BaseCommand):
    help = 'Links users with users profiles'

    def add_arguments(self, parser):
        pass

    def handle(self, *args, **options):
        pCount = Profile.objects.count()
        uCount = User.objects.count()
        print('Profiles: {} Users: {}'.format(pCount, uCount))
        if uCount > pCount:
            users = User.objects.exclude(profile__user__in=User.objects.all())
            for user in users:
                print('Creating profile for user: ' + str(user))
                profile = Profile.objects.create(bio='', user=user)
        else:
            print('The number of users and profiles is the same')

from django.core.management.base import BaseCommand, CommandError
from django.contrib.auth.models import User
from users.models import Profile


class Command(BaseCommand):
    help = 'Links users with users profiles'

    def add_arguments(self, parser):
        pass

    def handle(self, *args, **options):
        pCount = Profile.objects.count()
        uCount = User.objects.count()
        print('Profiles: {} Users: {}'.format(pCount, uCount))
        if uCount > pCount:
            users = User.objects.exclude(profile__user__in=User.objects.all())
            for user in users:
                print('Creating profile for user: ' + str(user))
                profile = Profile.objects.create(bio='', user=user)
        else:
            print('The number of users and profiles is the same')

from django.core.management.base import BaseCommand, CommandError
from django.contrib.auth.models import User
from users.models import Profile

class Command(BaseCommand):
    help = 'Links users with users profiles'

    def add_arguments(self, parser):
        # parser.add_argument('poll_ids', nargs='+', type=int)
        pass

    def handle(self, *args, **options):
        pCount = Profile.objects.count()
        uCount = User.objects.count()
        print("Profiles: {} Users: {}".format(pCount,uCount))
        if uCount > pCount:
            users = User.objects.exclude(profile__user__in=User.objects.all())
            for user in users:
                print("Creating profile for user: "+str(user))
                profile = Profile.objects.create(
                    bio = "",
                    user = user,
                )

        else:
            print("The number of users and profiles is the same")