Пример #1
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('email', models.EmailField(help_text='Required. Inform a valid email address.', max_length=255, unique=True)),
                ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('phone_number', models.CharField(help_text='Required', max_length=10)),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'abstract': False,
            },
            managers=[
                ('objects', authentication.models.UserManager()),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('authentication', '0002_auto_20190425_0850'),
    ]

    operations = [
        migrations.AddField(
            model_name='user',
            name='first_name',
            field=models.CharField(blank=True, max_length=128, verbose_name='first_name'),
        ),
        migrations.AddField(
            model_name='user',
            name='img',
            field=models.BinaryField(null=True, validators=[authentication.models.image_size_valid], verbose_name='img'),
        ),
        migrations.AddField(
            model_name='user',
            name='last_connection_at',
            field=models.DateTimeField(auto_now=True, verbose_name='last_connection_at'),
        ),
        migrations.AddField(
            model_name='user',
            name='last_name',
            field=models.CharField(blank=True, max_length=128, verbose_name='last_name'),
        ),
        migrations.AddField(
            model_name='user',
            name='student_id',
            field=models.CharField(blank=True, max_length=128, verbose_name='student_id'),
        ),
    ]
Пример #3
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('email', models.EmailField(max_length=254, unique=True, verbose_name='email address')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('email_verified', models.BooleanField(default=False, help_text='Designates whether this users email is verified. ', verbose_name='email_verified')),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'abstract': False,
            },
            managers=[
                ('objects', authentication.models.MyUserManager()),
            ],
        ),
    ]
Пример #4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Account',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('first_name', models.CharField(blank=True, max_length=40)),
                ('last_name', models.CharField(blank=True, max_length=40)),
                ('is_active', models.BooleanField(default=True)),
                ('is_admin', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SignupKey',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.CharField(default=authentication.models.generate_key, max_length=10)),
                ('account', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Пример #5
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('email', models.EmailField(db_index=True, max_length=254, unique=True, validators=[core.validators.CoreEmailValidator()])),
                ('first_name', models.CharField(blank=True, max_length=100, null=True)),
                ('last_name', models.CharField(blank=True, max_length=100, null=True)),
                ('avatar', models.ImageField(blank=True, null=True, upload_to=authentication.models.avatar_path)),
                ('bio', models.TextField(blank=True)),
                ('address', models.TextField(blank=True)),
                ('is_active', models.BooleanField(default=False)),
                ('is_staff', models.BooleanField(default=False)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
Пример #6
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('email', models.EmailField(max_length=254, unique=True, verbose_name='email')),
                ('full_name', models.CharField(blank=True, max_length=400, null=True, verbose_name='full name')),
                ('is_staff', models.BooleanField(default=False, verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, verbose_name='active')),
                ('is_verified', models.BooleanField(default=False, verbose_name='verified')),
                ('verification_uuid', models.UUIDField(default=uuid.uuid4, verbose_name='Unique Verification UUID')),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'abstract': False,
            },
            managers=[
                ('objects', authentication.models.UserAccountManager()),
            ],
        ),
    ]
Пример #7
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='category',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('category_name', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('item_name', models.CharField(max_length=100)),
                ('item_description', models.TextField(max_length=100)),
                ('item_price', models.IntegerField()),
                ('item_image', models.ImageField(upload_to='items')),
                ('item_category',
                 models.CharField(choices=[
                     ('Select category', 'Select Category'),
                     ('Laptops', 'Laptops'), ('Phones', 'Phones'),
                     ('House equipment', 'House equipment'),
                     ('Electronics', 'Electronics'), ('Clothes', 'Clothes'),
                     ('Shoes', 'Shoes'), ('Stationary', 'Stationary')
                 ],
                                  default=0,
                                  max_length=20)),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('item_owner',
                 models.ForeignKey(
                     default=authentication.models.DaemonStar_User,
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('authentication', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='account',
            name='avatar',
            field=models.ImageField(
                null=True,
                upload_to=authentication.models.generate_avatar_upload_path),
        ),
        migrations.AddField(
            model_name='account',
            name='birth_day',
            field=models.DateField(null=True),
        ),
        migrations.AddField(
            model_name='account',
            name='gender',
            field=models.IntegerField(choices=[(0, b'Male'), (1, b'Female')],
                                      default=0),
        ),
        migrations.AddField(
            model_name='account',
            name='phone_number',
            field=models.CharField(max_length=15, null=True),
        ),
    ]
Пример #9
0
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('authentication', '0002_invitecode_auto_team'),
    ]

    operations = [
        migrations.CreateModel(
            name='PasswordResetToken',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('token', models.CharField(max_length=64)),
                ('issued',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('expires',
                 models.DateTimeField(default=authentication.models.one_day)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Пример #10
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('email', models.EmailField(max_length=254, unique=True)),
            ],
            options={
                'abstract': False,
            },
            managers=[
                ('objects', authentication.models.UserManager()),
            ],
        ),
    ]
Пример #11
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Account',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('email', models.EmailField(blank=True, max_length=254, unique=True, verbose_name='email address')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
            },
            managers=[
                ('objects', authentication.models.AccountManager()),
            ],
        ),
    ]
Пример #12
0
class Migration(migrations.Migration):

    dependencies = [
        ('authentication', '0002_auto_20170514_1724'),
    ]

    operations = [
        migrations.AddField(
            model_name='account',
            name='address1',
            field=models.CharField(blank=True, max_length=100),
        ),
        migrations.AddField(
            model_name='account',
            name='address2',
            field=models.CharField(blank=True, max_length=100),
        ),
        migrations.AddField(
            model_name='account',
            name='address3',
            field=models.CharField(blank=True, max_length=100),
        ),
        migrations.AddField(
            model_name='account',
            name='dob',
            field=models.DateField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='account',
            name='gender',
            field=enumfields.fields.EnumField(
                enum=authentication.models.GenderType,
                max_length=10,
                null=True),
        ),
        migrations.AddField(
            model_name='account',
            name='phone_number1',
            field=models.CharField(blank=True, max_length=40),
        ),
        migrations.AddField(
            model_name='account',
            name='phone_number2',
            field=models.CharField(blank=True, max_length=40),
        ),
    ]
Пример #13
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='CustomUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('first_name', models.CharField(blank=True, max_length=20)),
                ('last_name', models.CharField(blank=True, max_length=20)),
                ('email',
                 models.EmailField(
                     max_length=100,
                     unique=True,
                     validators=[django.core.validators.EmailValidator()])),
                ('password',
                 models.CharField(
                     max_length=128,
                     validators=[authentication.utils.validate_password])),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('role',
                 models.IntegerField(choices=[(0, 'user'), (1, 'staff')],
                                     default=0)),
                ('is_active', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
            managers=[
                ('objects', authentication.models.CustomUserManager()),
            ],
        ),
    ]
Пример #14
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('post', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('first_name',
                 models.CharField(blank=True, max_length=50, null=True)),
                ('last_name',
                 models.CharField(blank=True, max_length=50, null=True)),
                ('location',
                 models.CharField(blank=True, max_length=50, null=True)),
                ('url', models.CharField(blank=True, max_length=80,
                                         null=True)),
                ('profile_info',
                 models.TextField(blank=True, max_length=150, null=True)),
                ('created', models.DateField(auto_now_add=True)),
                ('picture',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=authentication.models.user_directory_path,
                     verbose_name='Picture')),
                ('favorites', models.ManyToManyField(to='post.Post')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Пример #15
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Userprofile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('aadhar_number', models.CharField(max_length=100)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='CandidateProfile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('party_name', models.CharField(max_length=200)),
                ('party_short', models.CharField(max_length=10)),
                ('party_symbol',
                 models.FileField(
                     upload_to=authentication.models.user_directory_path)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Пример #16
0
class Migration(migrations.Migration):

    dependencies = [
        ('authentication', '0005_auto_20161025_2115'),
    ]

    operations = [
        migrations.AlterField(
            model_name='token',
            name='api_key_encoded',
            field=models.CharField(
                default=authentication.models.unusable_string, max_length=128),
        ),
        migrations.AlterField(
            model_name='token',
            name='hint',
            field=models.CharField(
                default='Not yet generated.',
                help_text="*'s do not accurately reflect length of password",
                max_length=18),
        ),
    ]
Пример #17
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('username', models.CharField(max_length=60)),
                ('first_name', models.CharField(max_length=50)),
                ('last_name', models.CharField(max_length=50)),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('phone_number',
                 models.CharField(blank=True,
                                  max_length=15,
                                  unique=True,
                                  validators=[
                                      django.core.validators.RegexValidator(
                                          regex='^\\d{10}$')
                                  ])),
            ],
            managers=[
                ('objects', authentication.models.UserManager()),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('authentication', '0002_customuser_username_added'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='customuser',
            options={},
        ),
        migrations.AlterModelManagers(
            name='customuser',
            managers=[
                ('objects', authentication.models.CustomUserManager()),
            ],
        ),
        migrations.RemoveField(
            model_name='customuser',
            name='date_joined',
        ),
        migrations.RemoveField(
            model_name='customuser',
            name='first_name',
        ),
        migrations.RemoveField(
            model_name='customuser',
            name='last_name',
        ),
        migrations.AlterField(
            model_name='customuser',
            name='email',
            field=models.EmailField(max_length=254, unique=True),
        ),
        migrations.AlterField(
            model_name='customuser',
            name='is_active',
            field=models.BooleanField(default=True),
        ),
        migrations.AlterField(
            model_name='customuser',
            name='is_staff',
            field=models.BooleanField(default=True),
        ),
        migrations.AlterField(
            model_name='customuser',
            name='username',
            field=models.CharField(max_length=30),
        ),
    ]
Пример #19
0
class Migration(migrations.Migration):

    dependencies = [
        ('authentication', '0004_auto_20161025_2106'),
    ]

    operations = [
        migrations.AlterField(
            model_name='token',
            name='api_key_encoded',
            field=models.CharField(
                blank=True,
                default=authentication.models.unusable_string,
                max_length=128),
        ),
        migrations.AlterField(
            model_name='token',
            name='random_key',
            field=models.CharField(
                default=authentication.models.unusable_string,
                max_length=128,
                unique=True),
        ),
    ]
Пример #20
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='EmailConfirmationRequest',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('token', models.CharField(max_length=36, unique=True)),
                ('valid_until', models.DateTimeField(default=authentication.models.default_valid_date)),
                ('email', models.EmailField(max_length=254)),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
Пример #21
0
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("authentication", "0001_initial"),
    ]

    operations = [
        migrations.CreateModel(
            name="AuthToken",
            fields=[
                (
                    "key",
                    models.CharField(
                        default=authentication.models.generate_key,
                        editable=False,
                        max_length=32,
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                (
                    "created_at",
                    models.DateTimeField(auto_now_add=True,
                                         verbose_name="Created"),
                ),
                (
                    "user",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to=settings.AUTH_USER_MODEL,
                        verbose_name="User",
                    ),
                ),
            ],
        ),
        migrations.RemoveField(model_name="usertoken", name="user"),
        migrations.DeleteModel(name="UserToken"),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(blank=True,
                                  db_index=True,
                                  max_length=255,
                                  unique=True)),
                ('email',
                 models.EmailField(db_index=True, max_length=255,
                                   unique=True)),
                ('first_name',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('last_name',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('is_verified', models.BooleanField(default=False)),
                ('is_passenger', models.BooleanField(default=False)),
                ('is_driver', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('mobile_no',
                 models.CharField(blank=True,
                                  default='',
                                  max_length=20,
                                  null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('password_string', models.CharField(max_length=500,
                                                     null=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('image',
                 models.ImageField(
                     default='default.jpg',
                     null=True,
                     upload_to=authentication.models.author_image_upload)),
                ('about',
                 models.TextField(blank=True, max_length=800, null=True)),
                ('facebook',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('twitter',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('instagram',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('youtube',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('thumbnail',
                 models.ImageField(
                     default='default.jpg',
                     null=True,
                     upload_to=authentication.models.author_image_upload)),
                ('email_token', models.TextField(blank=True, null=True)),
                ('state',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('key', models.TextField(blank=True, null=True)),
                ('auth_provider',
                 models.CharField(default='email', max_length=255)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
Пример #23
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('username', models.CharField(max_length=150, unique=True)),
                ('email',
                 models.EmailField(max_length=255,
                                   unique=True,
                                   verbose_name='email address')),
                ('avatar',
                 models.ImageField(blank=True,
                                   max_length=255,
                                   null=True,
                                   upload_to='avatars')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether this user can access this admin site.',
                     verbose_name='is staff')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='is superuser')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'db_table': 'users',
            },
            managers=[
                ('objects', authentication.models.CustomAccountManager()),
            ],
        ),
    ]
Пример #24
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('email',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='Email Address')),
                ('dob',
                 models.DateField(blank=True,
                                  null=True,
                                  verbose_name='Date of Birth')),
                ('marital_status',
                 models.CharField(blank=True,
                                  choices=[('M', 'Married'), ('S', 'Single')],
                                  max_length=1,
                                  null=True,
                                  verbose_name='Marital Status')),
                ('profile_photo',
                 models.ImageField(
                     blank=True,
                     default=
                     '/home/flash/Documents/Projects/beaprose2/beaprose/media/default/persion.svg',
                     null=True,
                     upload_to=authentication.models.upload_profile_photo,
                     verbose_name='Profile Photo')),
                ('phoneNumber',
                 models.CharField(blank=True,
                                  max_length=20,
                                  null=True,
                                  verbose_name='Phone Number')),
                ('phoneNumberVerified',
                 models.BooleanField(default=False,
                                     verbose_name='Phone Number Verified')),
                ('is_expert',
                 models.BooleanField(default=False,
                                     verbose_name='Expert Status')),
                ('is_customer',
                 models.BooleanField(default=False,
                                     verbose_name='Customer Status')),
                ('is_influencer',
                 models.BooleanField(default=False,
                                     verbose_name='Influencer Status')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', authentication.managers.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='BillingCard',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('card_number', models.CharField(max_length=50)),
                ('card_name', models.CharField(max_length=100)),
                ('cvc', models.CharField(max_length=10)),
                ('expiry', models.CharField(max_length=5)),
            ],
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Expert',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('hasAcceptedAgreement',
                 models.BooleanField(
                     default=False,
                     verbose_name='Has Accepted User Agreement?')),
                ('payment_cards',
                 models.ManyToManyField(to='authentication.BillingCard')),
            ],
        ),
        migrations.CreateModel(
            name='ExpertProfile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('headline',
                 models.CharField(blank=True,
                                  max_length=100,
                                  verbose_name='Headline')),
                ('short_bio',
                 models.TextField(blank=True, verbose_name='Biography')),
                ('timezone',
                 models.CharField(blank=True,
                                  max_length=100,
                                  verbose_name='Timezone')),
                ('country',
                 models.CharField(blank=True,
                                  max_length=100,
                                  verbose_name='Country')),
                ('city',
                 models.CharField(blank=True,
                                  max_length=100,
                                  verbose_name='City')),
                ('skype_number',
                 models.CharField(blank=True,
                                  max_length=100,
                                  verbose_name='Skype')),
                ('rate_per_hour', models.PositiveIntegerField()),
                ('is_long_term', models.BooleanField(default=False)),
                ('is_pro_bono', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Influencer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Keyword',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('keyword', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Newsletter',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('email', models.EmailField(max_length=254)),
            ],
        ),
        migrations.CreateModel(
            name='Sector',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('sector', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Skill',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('skill', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='WorkHistory',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('job_title',
                 models.CharField(max_length=30, verbose_name='Job Title')),
                ('country_work',
                 models.CharField(max_length=30, verbose_name='Work Country')),
                ('city_work',
                 models.CharField(max_length=30, verbose_name='Work City')),
                ('role', models.CharField(max_length=30, verbose_name='Role')),
                ('start_date', models.DateField(verbose_name='Start Date')),
                ('end_date', models.DateField(verbose_name='End Date')),
            ],
        ),
        migrations.AddField(
            model_name='expertprofile',
            name='keywords',
            field=models.ManyToManyField(blank=True,
                                         related_name='experts',
                                         to='authentication.Keyword'),
        ),
        migrations.AddField(
            model_name='expertprofile',
            name='sectors',
            field=models.ManyToManyField(blank=True,
                                         related_name='experts',
                                         to='authentication.Sector'),
        ),
        migrations.AddField(
            model_name='expertprofile',
            name='skills',
            field=models.ManyToManyField(blank=True,
                                         related_name='experts',
                                         to='authentication.Skill'),
        ),
        migrations.AddField(
            model_name='expertprofile',
            name='work_history',
            field=models.ManyToManyField(blank=True,
                                         related_name='experts',
                                         to='authentication.WorkHistory'),
        ),
        migrations.AddField(
            model_name='expert',
            name='profile',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='authentication.ExpertProfile'),
        ),
        migrations.AddField(
            model_name='expert',
            name='user',
            field=models.OneToOneField(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
    ]
Пример #25
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='ApplicationClient',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('main_phone_number', models.IntegerField(blank=True, null=True)),
                ('alt_phone_number', models.IntegerField(blank=True, null=True)),
                ('age', models.IntegerField(blank=True, null=True)),
                ('gender', models.CharField(blank=True, max_length=50, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('county', models.CharField(blank=True, max_length=50, null=True)),
                ('sub_county', models.CharField(blank=True, max_length=50, null=True)),
                ('village_or_estate', models.CharField(blank=True, max_length=50, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='ClientEmergencyContact',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(blank=True, max_length=50, null=True)),
                ('last_name', models.CharField(blank=True, max_length=50, null=True)),
                ('relation', models.CharField(blank=True, max_length=50, null=True)),
                ('email', models.EmailField(blank=True, max_length=254, null=True)),
                ('main_phone_number', models.IntegerField(blank=True, null=True)),
                ('alt_phone_number', models.IntegerField(blank=True, null=True)),
                ('client', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='authentication.ApplicationClient')),
            ],
        ),
        migrations.AddField(
            model_name='applicationclient',
            name='location',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='authentication.Location'),
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('email', models.EmailField(max_length=254, unique=True, verbose_name='email address')),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', authentication.models.UserManager()),
            ],
        ),
    ]
Пример #26
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('name', models.CharField(max_length=30)),
                ('surname', models.CharField(max_length=30)),
                ('email', models.EmailField(max_length=256, unique=True)),
                ('password', models.CharField(max_length=128)),
                ('is_superuser', models.BooleanField(default=False)),
                ('is_staff', models.BooleanField(default=False)),
                ('birthday', models.DateField(blank=True, null=True)),
                ('location', models.CharField(blank=True, max_length=256)),
                ('skills', models.CharField(blank=True, max_length=1024)),
                ('biography', models.TextField(blank=True)),
            ],
            options={
                'abstract': False,
            },
            managers=[
                ('objects', authentication.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Chat',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('users',
                 models.ManyToManyField(related_name='chats',
                                        to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('description', models.TextField()),
                ('tags', models.CharField(blank=True, max_length=1024)),
                ('required_investments', models.FloatField()),
                ('creation_date', models.DateTimeField(auto_now_add=True)),
                ('cofounders',
                 models.ManyToManyField(related_name='cofounded_projects',
                                        to=settings.AUTH_USER_MODEL)),
                ('founder',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='founded_projects',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('text', models.TextField()),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('chat',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='upstarter.Chat')),
                ('user',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     related_name='messages',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Investment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('amount', models.FloatField()),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('investor',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     related_name='investments',
                     to=settings.AUTH_USER_MODEL)),
                ('project',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     related_name='investments',
                     to='upstarter.Project')),
            ],
        ),
    ]
Пример #27
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='AuthUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('username', models.CharField(max_length=50, unique=True)),
                ('email',
                 models.EmailField(max_length=255,
                                   unique=True,
                                   verbose_name='email address')),
                ('name', models.CharField(max_length=255)),
                ('date_of_birth', models.DateField()),
                ('contact_number', models.CharField(max_length=15)),
                ('bmdc_reg_number', models.CharField(max_length=15)),
                ('image',
                 models.ImageField(blank=True,
                                   max_length=500,
                                   null=True,
                                   upload_to='profileImages/')),
                ('about', models.TextField(blank=True, default='', null=True)),
                ('is_active', models.BooleanField(default=True)),
                ('is_admin', models.BooleanField(default=False)),
            ],
            options={
                'verbose_name': 'Dentist',
                'verbose_name_plural': 'Dentists',
            },
            managers=[
                ('objects', authentication.models.AuthUserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Schedule',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('start', models.TimeField()),
                ('end', models.TimeField()),
                ('branch_name',
                 models.CharField(choices=[('gazipur', 'GAZIPUR'),
                                           ('uttara', 'UTTARA')],
                                  default='uttara',
                                  max_length=15)),
                ('weekday',
                 models.CharField(choices=[('All', 'ALL'),
                                           ('Sunday', 'SUNDAY'),
                                           ('Monday', 'MONDAY'),
                                           ('Tuesday', 'TUESDAY'),
                                           ('Wednesday', 'WEDNESDAY'),
                                           ('Thursday', 'THURSDAY'),
                                           ('Friday', 'FRIDAY'),
                                           ('Saturday', 'SATURDAY')],
                                  default='Sunday',
                                  max_length=10)),
                ('max_patient', models.PositiveIntegerField(default=15)),
                ('dentist',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='schedule',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Пример #28
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='APIManagerUser',
            fields=[
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('uuid',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('username', models.CharField(max_length=64, unique=True)),
                ('is_gatekeeper', models.BooleanField(default=False)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', authentication.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='ConfirmationToken',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('token', models.CharField(max_length=64)),
                ('created', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='EmailAddress',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('address', models.EmailField(max_length=254)),
                ('confirmed', models.BooleanField(default=False)),
                ('primary', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('deleted', models.BooleanField(default=False)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='confirmationtoken',
            name='email',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='authentication.EmailAddress'),
        ),
    ]
Пример #29
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomGroup',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=32, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='CustomUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('email', models.CharField(max_length=40, unique=True)),
                ('certificate', models.CharField(max_length=20, unique=True)),
                ('username', models.CharField(max_length=20)),
                ('point', models.IntegerField(default=0)),
                ('correct_num_ans', models.IntegerField(default=0)),
                ('num_ans', models.IntegerField(default=0)),
                ('is_approved', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('is_admin', models.BooleanField(default=False)),
                ('is_superuser', models.BooleanField(default=False)),
                ('group',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='authentication.CustomGroup')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', authentication.models.CustomUserManager()),
            ],
        ),
    ]
Пример #30
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0007_alter_validators_add_error_messages'),
    ]

    operations = [
        migrations.CreateModel(
            name='Account',
            fields=[
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     serialize=False,
                     to=settings.AUTH_USER_MODEL)),
                ('phone',
                 phonenumber_field.modelfields.PhoneNumberField(max_length=128,
                                                                null=True)),
                ('profile_image',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=authentication.models.upload_location)),
            ],
        ),
        migrations.CreateModel(
            name='City',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Country',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=36, null=True)),
            ],
        ),
        migrations.AddField(
            model_name='city',
            name='country',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='cities',
                to='authentication.Country'),
        ),
        migrations.AddField(
            model_name='account',
            name='city',
            field=models.OneToOneField(
                default='',
                on_delete=django.db.models.deletion.CASCADE,
                related_name='accounts',
                to='authentication.City'),
        ),
        migrations.AddField(
            model_name='account',
            name='country',
            field=models.ForeignKey(
                default='',
                on_delete=django.db.models.deletion.CASCADE,
                related_name='accounts',
                to='authentication.Country'),
        ),
    ]