Exemple #1
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Department',
            fields=[
                ('d_id', models.AutoField(primary_key=True, serialize=False)),
                ('d_name',
                 models.CharField(max_length=20,
                                  unique=True,
                                  verbose_name='학부')),
            ],
            options={
                'verbose_name': '소속대학',
                'verbose_name_plural': '소속대학',
            },
        ),
        migrations.CreateModel(
            name='Major',
            fields=[
                ('m_id', models.AutoField(primary_key=True, serialize=False)),
                ('m_name',
                 models.CharField(max_length=20,
                                  unique=True,
                                  verbose_name='전공')),
                ('m_d',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='account.Department',
                                   verbose_name='소속대학')),
            ],
            options={
                'verbose_name': '전공',
                'verbose_name_plural': '전공',
            },
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('s_id',
                 models.CharField(max_length=12,
                                  unique=True,
                                  validators=[account.models.sid_validator],
                                  verbose_name='학번')),
                ('s_email',
                 models.EmailField(max_length=254, verbose_name='이메일')),
                ('since_y',
                 models.IntegerField(help_text='e.g. 2018',
                                     verbose_name='입학연도')),
                ('s_d',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='account.Department',
                                   verbose_name='소속대학')),
                ('s_m',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='account.Major',
                                   verbose_name='전공')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': '학생',
                'verbose_name_plural': '학생',
            },
        ),
        migrations.AlterUniqueTogether(
            name='major',
            unique_together={('m_id', 'm_d')},
        ),
    ]
Exemple #2
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='MyUser',
            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(
                     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')),
                ('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)),
                ('nickname',
                 models.CharField(blank=True, default='', max_length=20)),
                ('bio', models.CharField(blank=True, max_length=120)),
                ('profile_image',
                 models.ImageField(
                     blank=True,
                     default=
                     '/home/prozeshi/guys/media//uploads/images/default.jpg',
                     upload_to=account.models.user_dir_path)),
                ('blogger_or_student',
                 models.CharField(choices=[('student', 'student'),
                                           ('blogger', 'blogger')],
                                  default='blogger',
                                  max_length=25)),
                ('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', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('is_verified',
                 models.BooleanField(blank=True, default=False, null=True)),
                ('created_at',
                 models.DateTimeField(auto_now_add=True, null=True)),
                ('user_student',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Blogger',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('lang_experties',
                 models.CharField(choices=[('HTML', 'HTML'), ('Css', 'Css'),
                                           ('js', 'js'), ('Kotlin', 'Kotlin'),
                                           ('Java', 'java'),
                                           ('Python', 'Python'), ('C#', 'C#'),
                                           ('C', 'C'), ('C++', 'C++'),
                                           ('Perl', 'Perl')],
                                  default='C',
                                  max_length=100)),
                ('more',
                 models.URLField(default='https://www.google.com',
                                 max_length=1000)),
                ('user_blogger',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Exemple #3
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='MyUser',
            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=150,
                                  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.EmailField(max_length=254, unique=True)),
                ('is_active', models.BooleanField(default=False)),
                ('activation_code', models.CharField(blank=True,
                                                     max_length=50)),
                ('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', account.models.MyUserManager()),
            ],
        ),
    ]
Exemple #4
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')),
                ('email', models.EmailField(max_length=200, unique=True)),
                ('first_name',
                 models.CharField(blank=True, max_length=72, null=True)),
                ('last_name',
                 models.CharField(blank=True, max_length=72, null=True)),
                ('position',
                 models.CharField(choices=[('1', 'developer'),
                                           ('2', 'designer'), ('3', 'trainee'),
                                           ('0', 'management'),
                                           ('4', 'staff')],
                                  default='1',
                                  max_length=1)),
                ('avatar',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=account.models.upload_avatar_to,
                                   verbose_name='profile picture')),
                ('date_joined', models.DateTimeField(auto_now_add=True)),
                ('date_updated', models.DateTimeField(auto_now=True)),
                ('is_staff',
                 models.BooleanField(default=False,
                                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text='Designates whether this user is active',
                     verbose_name='active')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user is super user or site admin',
                     verbose_name='super user')),
                ('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,
            },
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('employee', '0001_initial'),
        ('auth', '0012_alter_user_first_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')),
                ('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')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  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')),
                ('profile_image',
                 models.ImageField(default='default.png',
                                   upload_to=account.models.photo_path)),
                ('member_since', models.DateTimeField(blank=True, null=True)),
                ('designation',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='employee.designation')),
                ('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', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('username',
                 models.CharField(blank=True, max_length=150, null=True)),
                ('status',
                 models.CharField(blank=True,
                                  default='Signed Out',
                                  max_length=100)),
                ('ban_time',
                 models.DateTimeField(blank=True, default=None, null=True)),
                ('attendance_time',
                 models.DateTimeField(blank=True, default=None, null=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Exemple #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')),
                ('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')),
                ('username',
                 models.CharField(error_messages={
                     'unique':
                     'A user with that username already exists.'
                 },
                                  max_length=30,
                                  unique=True,
                                  validators=[
                                      account.models.UsernameValidator(),
                                      account.models.UsernameLengthValidator(6)
                                  ],
                                  verbose_name='用户名')),
                ('email',
                 models.EmailField(error_messages={
                     'unique':
                     'This email has already been used.'
                 },
                                   max_length=192,
                                   unique=True,
                                   verbose_name='邮箱')),
                ('school',
                 models.CharField(blank=True, max_length=64,
                                  verbose_name='学校')),
                ('name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='真实姓名')),
                ('student_id',
                 models.CharField(blank=True, max_length=30,
                                  verbose_name='学号')),
                ('magic',
                 models.CharField(blank=True,
                                  choices=[('red', 'Red'), ('green', 'Green'),
                                           ('teal', 'Teal'), ('blue', 'Blue'),
                                           ('purple', 'Purple'),
                                           ('orange', 'Orange'),
                                           ('grey', 'Grey')],
                                  max_length=18,
                                  verbose_name='魔法')),
                ('show_tags',
                 models.BooleanField(default=True, verbose_name='显示标签')),
                ('preferred_lang',
                 models.CharField(choices=[
                     ('c', 'C'), ('cpp', 'C++11'), ('cc14', 'C++14'),
                     ('cc17', 'C++17'), ('py2', 'Python 2'),
                     ('python', 'Python 3'), ('pypy', 'PyPy'),
                     ('pypy3', 'PyPy 3'), ('java', 'Java 8'),
                     ('pas', 'Pascal'), ('text', 'Text')
                 ],
                                  default='cpp',
                                  max_length=12,
                                  verbose_name='偏好语言')),
                ('motto',
                 models.CharField(blank=True,
                                  max_length=192,
                                  verbose_name='警句')),
                ('avatar',
                 models.ImageField(default='avatar/default.jpg',
                                   upload_to='avatar',
                                   verbose_name='头像')),
                ('polygon_enabled', models.BooleanField(default=False)),
                ('score', models.FloatField(default=0)),
                ('username_change_attempt', models.IntegerField(default=0)),
                ('email_subscription',
                 models.BooleanField(default=True, verbose_name='邮件订阅')),
                ('rating', models.IntegerField(default=0)),
                ('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={
                'ordering': ['-score'],
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='School',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=192, unique=True)),
                ('abbr', models.CharField(max_length=192, unique=True)),
                ('alias', models.CharField(blank=True, max_length=192)),
            ],
        ),
        migrations.CreateModel(
            name='Payment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('type',
                 models.CharField(choices=[
                     ('change_username', 'Change Username'),
                     ('download_case', 'Download Case'), ('reward', 'Reward'),
                     ('transfer', 'Transfer')
                 ],
                                  max_length=20)),
                ('detail_message', models.TextField(blank=True)),
                ('create_time', models.DateTimeField(auto_now_add=True)),
                ('credit', models.FloatField()),
                ('balance', models.FloatField()),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-create_time'],
            },
        ),
    ]
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='SlaveUser',
            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(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')),
                ('first_name', models.CharField(blank=True, max_length=150, 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')),
                ('is_verified', models.BooleanField(default=False, help_text='Designates whether this user is verified the email address.', verbose_name='verified')),
                ('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', account.models.SlaveUserManager()),
            ],
        ),
        migrations.CreateModel(
            name='UserFollowing',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('following_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='followers', to=settings.AUTH_USER_MODEL)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='following', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ('-created_at',),
            },
        ),
        migrations.CreateModel(
            name='SlaveUserProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('avatar', models.ImageField(blank=True, null=True, upload_to='profiles/avatars/')),
                ('banner', models.ImageField(blank=True, null=True, upload_to='profiles/banners/')),
                ('bio', models.TextField(blank=True)),
                ('app_notify', models.BooleanField(default=False)),
                ('email_notify', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Profile',
                'verbose_name_plural': 'Profiles',
                'ordering': ('user',),
            },
        ),
        migrations.CreateModel(
            name='SignupCode',
            fields=[
                ('code', models.CharField(max_length=40, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('ip_address', models.GenericIPAddressField()),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Signup Code',
                'verbose_name_plural': 'Signup Codes',
            },
        ),
        migrations.CreateModel(
            name='PasswordResetCode',
            fields=[
                ('code', models.CharField(max_length=40, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Password Reset Code',
                'verbose_name_plural': 'Password Reset Codes',
            },
        ),
        migrations.CreateModel(
            name='EmailChangeCode',
            fields=[
                ('code', models.CharField(max_length=40, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('email', models.EmailField(max_length=255)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Email Change Code',
                'verbose_name_plural': 'Email Change Codes',
            },
        ),
        migrations.AddConstraint(
            model_name='userfollowing',
            constraint=models.UniqueConstraint(fields=('user', 'following_user'), name='unique_followers'),
        ),
    ]
Exemple #8
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",
                    ),
                ),
                (
                    "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)),
                (
                    "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", account.models.UserManager())],
        )
    ]
Exemple #9
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 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')),
                ('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',
            },
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=150)),
                ('username', models.CharField(max_length=30, unique=True)),
                ('photo',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to='profile_photo/')),
                ('gender',
                 models.CharField(blank=True,
                                  choices=[('male', 'Male'),
                                           ('female', 'Female')],
                                  max_length=6,
                                  null=True)),
                ('birth_date', models.DateField(blank=True, null=True)),
                ('country',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('address',
                 models.CharField(blank=True, max_length=220, null=True)),
                ('phone_number',
                 models.CharField(blank=True,
                                  max_length=11,
                                  null=True,
                                  unique=True)),
                ('website', models.URLField(blank=True, null=True)),
                ('market_place_profile', models.URLField(blank=True,
                                                         null=True)),
                ('facebook', models.URLField(blank=True, null=True)),
                ('twitter', models.URLField(blank=True, null=True)),
                ('linkedin', models.URLField(blank=True, null=True)),
                ('instagram', models.URLField(blank=True, null=True)),
                ('github', models.URLField(blank=True, null=True)),
                ('youtube', models.URLField(blank=True, null=True)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('user',
                 models.OneToOneField(
                     default=account.models.get_current_user,
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Exemple #10
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        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')),
                ('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(
                     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')),
                ('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,
                                   verbose_name='email address')),
                ('no_social', models.BooleanField(blank=True, null=True)),
                ('total_scores', models.PositiveIntegerField(default=0)),
                ('rank',
                 models.CharField(choices=[('Academy Student', 'academy'),
                                           ('Genin', 'genin'),
                                           ('Chuunin', 'chuunin'),
                                           ('Jounin', 'jounin'),
                                           ('ANBU', 'anbu'),
                                           ('Sannin', 'sannin'),
                                           ('Kage', 'kage')],
                                  default='academy',
                                  max_length=40)),
                ('slug', models.SlugField(max_length=60,
                                          null=True,
                                          unique=True)),
                ('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', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('avatar',
                 models.ImageField(upload_to=account.models.avatar_upload_to)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='FeedbackModel',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('mail_subject', models.CharField(max_length=150)),
                ('mail_text', models.TextField()),
                ('send_time', models.DateTimeField(blank=True, null=True)),
                ('user',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Exemple #11
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=191,
                                   unique=True,
                                   verbose_name='이메일')),
                ('username', models.CharField(max_length=30,
                                              verbose_name='이름')),
                ('is_active',
                 models.BooleanField(default=True, verbose_name='활성')),
                ('is_admin',
                 models.BooleanField(default=False, verbose_name='관리자')),
                ('date_joined',
                 models.DateTimeField(auto_now_add=True, verbose_name='가입시간')),
                ('profile_img',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=account.models.user_profile_img_path,
                     verbose_name='프로필 사진')),
                ('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',
                'ordering': ('-date_joined', ),
            },
        ),
    ]
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('uuid',
                 models.UUIDField(db_index=True,
                                  default=uuid.uuid4,
                                  editable=False)),
                ('email', models.EmailField(max_length=128, unique=True)),
                ('name', models.CharField(max_length=128)),
                ('username',
                 models.CharField(blank=True, max_length=128, unique=True)),
                ('url', models.URLField()),
                ('is_verified', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('image',
                 models.ImageField(blank=True, null=True,
                                   upload_to='company/')),
                ('date_joined', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'verbose_name': 'company',
                'verbose_name_plural': 'companies',
            },
            managers=[
                ('active_now', django.db.models.manager.Manager()),
            ],
        ),
        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')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('uuid',
                 models.UUIDField(db_index=True,
                                  default=uuid.uuid4,
                                  editable=False)),
                ('email', models.EmailField(max_length=128, unique=True)),
                ('username',
                 models.CharField(blank=True, max_length=128, unique=True)),
                ('fullname', models.CharField(blank=True, max_length=128)),
                ('is_staff', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('image',
                 models.ImageField(blank=True, null=True,
                                   upload_to='profile/')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('last_login', models.DateTimeField(null=True)),
                ('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', account.models.UserManager()),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        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')),
                ('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(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=30,
                     unique=True,
                     validators=[
                         django.core.validators.RegexValidator(
                             '^[\\w.@+-]+$',
                             'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.'
                         )
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  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')),
                ('phone',
                 models.CharField(max_length=10,
                                  unique=True,
                                  validators=[account.models.phone_validator
                                              ])),
                ('is_doctor', models.BooleanField(default=False)),
                ('is_parent', models.BooleanField(default=False)),
                ('gender',
                 models.CharField(choices=[('M', 'Male'), ('F', 'Female'),
                                           ('NS', '--')],
                                  default='NS',
                                  max_length=2)),
                ('street',
                 models.CharField(blank=True, max_length=128, null=True)),
                ('district',
                 models.CharField(blank=True, max_length=50, null=True)),
                ('city', models.CharField(blank=True, max_length=50,
                                          null=True)),
                ('state', models.CharField(blank=True,
                                           max_length=50,
                                           null=True)),
                ('zipcode',
                 models.CharField(
                     blank=True,
                     max_length=6,
                     null=True,
                     validators=[account.models.zipcode_validator])),
            ],
            options={
                'verbose_name': 'User',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Child',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('dob', models.DateField()),
                ('first_name',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('last_name',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('gender',
                 models.CharField(choices=[('M', 'Male'), ('F', 'Female'),
                                           ('NS', '--')],
                                  default='NS',
                                  max_length=2)),
            ],
            options={
                'verbose_name': 'Child',
                'verbose_name_plural': 'Children',
            },
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('category',
                 models.CharField(choices=[('U', 'Unscheduled Check Up'),
                                           ('S', 'Scheduled Check Up'),
                                           ('V', 'Vaccination')],
                                  default='V',
                                  max_length=1)),
                ('name', models.CharField(max_length=128)),
                ('reason', models.CharField(max_length=128)),
                ('creation_date', models.DateField(auto_now_add=True)),
                ('due_date', models.DateField()),
                ('given_date', models.DateField()),
                ('notes',
                 models.CharField(blank=True, max_length=128, null=True)),
                ('child',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='tasks',
                                   to='account.Child')),
            ],
            options={
                'verbose_name': 'Task',
            },
        ),
        migrations.CreateModel(
            name='Doctor',
            fields=[
                ('doctor',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     related_name='doctor_info',
                     serialize=False,
                     to=settings.AUTH_USER_MODEL)),
                ('hospital', models.CharField(max_length=128)),
            ],
            options={
                'verbose_name': 'Doctor',
            },
        ),
        migrations.CreateModel(
            name='Parent',
            fields=[
                ('parent',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     related_name='parent_info',
                     serialize=False,
                     to=settings.AUTH_USER_MODEL)),
                ('aadhar',
                 models.CharField(max_length=16,
                                  unique=True,
                                  validators=[account.models.aadhar_validator
                                              ])),
            ],
            options={
                'verbose_name': 'Parent',
            },
        ),
        migrations.AddField(
            model_name='customuser',
            name='groups',
            field=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'),
        ),
        migrations.AddField(
            model_name='customuser',
            name='user_permissions',
            field=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'),
        ),
        migrations.AddField(
            model_name='task',
            name='created_by',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='tasks_created',
                to='account.Doctor'),
        ),
        migrations.AddField(
            model_name='task',
            name='given_by',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='tasks_given',
                to='account.Doctor'),
        ),
        migrations.AddField(
            model_name='child',
            name='parent',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='children',
                to='account.Parent'),
        ),
    ]
Exemple #14
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')),
                ('phone_number', models.CharField(blank=True, max_length=13, validators=[django.core.validators.RegexValidator(message="O número de telefone deve ser digitado no formato: '+258849293949'. São permitidos até 13 dígitos.", regex='^\\+?258?\\d{9,13}$')])),
                ('is_instructor', models.BooleanField(default=False)),
                ('is_student', 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', account.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Instructor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('location', models.CharField(blank=True, max_length=30)),
                ('phone_number', models.CharField(blank=True, max_length=30)),
                ('role', models.CharField(blank=True, max_length=30)),
                ('description', models.TextField(blank=True, max_length=30)),
                ('educational_institution', models.CharField(blank=True, max_length=30)),
                ('birth_date', models.DateField(blank=True, null=True)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('location', models.CharField(blank=True, max_length=30)),
                ('phone_number', models.CharField(blank=True, max_length=30)),
                ('description', models.TextField(blank=True, max_length=30)),
                ('educational_institution', models.CharField(blank=True, max_length=30)),
                ('birth_date', models.DateField(blank=True, null=True)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Exemple #15
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')),
                ('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')),
                ('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')),
                ('is_teacher',
                 models.BooleanField(
                     default=0,
                     help_text=
                     'Designates whether the user have teacher access.',
                     verbose_name='Teacher 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', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='UserDetail',
            fields=[
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     serialize=False,
                     to=settings.AUTH_USER_MODEL)),
                ('gender',
                 models.CharField(choices=[('M', 'Male'), ('F', 'Female')],
                                  max_length=1,
                                  verbose_name='Gender')),
                ('date_of_birth',
                 models.DateField(null=True, verbose_name='Date of Birth')),
                ('address',
                 models.CharField(max_length=96, verbose_name='Address')),
                ('phone_number',
                 models.CharField(
                     max_length=13,
                     validators=[
                         django.core.validators.RegexValidator(
                             message=
                             'Phone number must start with 0. Up to 13 digits allowed.',
                             regex='0[\\d]{9,12}')
                     ],
                     verbose_name='Phone Number')),
                ('ktp',
                 models.ImageField(
                     help_text='Only accepts images',
                     upload_to='account/document/ktp/%Y%m%d',
                     verbose_name='Identification ID (KTP/SIM/Student Card)')),
                ('occupation',
                 models.CharField(max_length=32, verbose_name='Occupation')),
                ('experiences',
                 models.CharField(max_length=32, verbose_name='Experiences')),
                ('cv',
                 models.FileField(
                     help_text='Only accepts pdfs',
                     upload_to='account/document/cv/%Y%m%d',
                     validators=[account.models.validate_file_extension],
                     verbose_name='CV')),
                ('photos',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to='account/photos/%Y%m%d',
                                   verbose_name='Photos')),
                ('about',
                 models.CharField(blank=True,
                                  max_length=1024,
                                  verbose_name='About')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_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')),
                ('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')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  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')),
                ('pic',
                 models.ImageField(
                     blank=True,
                     default='default-profile-img.png',
                     null=True,
                     upload_to=account.models.Account.upload_to_path)),
                ('city', models.CharField(blank=True, max_length=21,
                                          null=True)),
                ('three_word',
                 models.CharField(blank=True, max_length=35, null=True)),
                ('about', models.TextField(blank=True, null=True)),
                ('webpage',
                 models.CharField(blank=True, max_length=150, null=True)),
                ('total_likes', models.IntegerField(default=0)),
                ('total_comments', models.IntegerField(default=0)),
                ('total_posts', models.IntegerField(default=0)),
                ('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': 'Kullanıcı',
                'verbose_name_plural': 'Kullanıcılar',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
Exemple #17
0
class Migration(migrations.Migration):

    replaces = [('account', '0001_initial'),
                ('account', '0002_auto_20200407_1242'),
                ('account', '0003_auto_20200407_1718'),
                ('account', '0004_tutordata_profile_picture'),
                ('account', '0005_auto_20200409_1113'),
                ('account', '0006_auto_20200413_1438'),
                ('account', '0007_auto_20200413_1447'),
                ('account', '0008_passwordresettoken'),
                ('account', '0009_auto_20200413_1655'),
                ('account', '0010_trackingdenycounter'),
                ('account', '0011_auto_20201114_1926')]

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

    operations = [
        migrations.CreateModel(
            name='SchoolType',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50,
                                  verbose_name='Name des Schultyps')),
            ],
            options={
                'verbose_name': 'Schultyp',
                'verbose_name_plural': 'Schultypen',
            },
        ),
        migrations.CreateModel(
            name='State',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50,
                                  unique=True,
                                  verbose_name='Name')),
                ('shortcode',
                 models.CharField(max_length=2,
                                  verbose_name='Kurzbezeichnung')),
            ],
            options={
                'verbose_name': 'Bundesland',
                'verbose_name_plural': 'Bundesländer',
            },
        ),
        migrations.CreateModel(
            name='Subject',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='Name')),
            ],
            options={
                'verbose_name': 'Fach',
                'verbose_name_plural': 'Fächer',
            },
        ),
        migrations.CreateModel(
            name='SchoolData',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('grade', models.IntegerField(verbose_name='Klasse')),
                ('school_type',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='account.schooltype')),
            ],
            options={
                'verbose_name': 'Schultyp- und Klassenkombination',
                'verbose_name_plural': 'Schultyp- und Klassenkombinationen',
            },
        ),
        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')),
                ('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='E-Mail')),
                ('uuid',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  unique=True)),
                ('is_staff', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('date_joined',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='Beitritt')),
                ('first_name',
                 models.CharField(max_length=50, verbose_name='Vorname')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=50,
                                  verbose_name='Nachname')),
                ('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')),
                ('state',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='account.state',
                                   verbose_name='Bundesland')),
                ('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')),
                ('gender',
                 models.CharField(choices=[('MA', 'männlich'),
                                           ('FE', 'weiblich'),
                                           ('DI', 'divers')],
                                  default='',
                                  max_length=2,
                                  verbose_name='Geschlecht')),
                ('email_verified',
                 models.BooleanField(default=False,
                                     verbose_name='E-Mail bestätigt')),
            ],
            options={
                'abstract': False,
                'verbose_name': 'Nutzer',
                'verbose_name_plural': 'Nutzer',
            },
        ),
        migrations.CreateModel(
            name='StudentData',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('school_data',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='account.schooldata',
                                   verbose_name='Klasse und Schulart')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Schülerdaten',
                'verbose_name_plural': 'Schülerdaten',
            },
        ),
        migrations.CreateModel(
            name='VerificationToken',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('token',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  unique=True)),
                ('created',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='Erstellt')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'E-Mail Verifizierungstoken',
                'verbose_name_plural': 'E-Mail Verifizierungstoken',
            },
        ),
        migrations.CreateModel(
            name='PasswordResetToken',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('token',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  unique=True)),
                ('created',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='Erstellt')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='TutorData',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('schooldata',
                 models.ManyToManyField(
                     to='account.SchoolData',
                     verbose_name='Mögliche Schultypen/Klassenstufen')),
                ('subjects',
                 models.ManyToManyField(to='account.Subject',
                                        verbose_name='Fächer')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
                ('verification_file',
                 models.FileField(blank=True,
                                  null=True,
                                  upload_to=account.models.tutor_upload_path,
                                  verbose_name='Vefizierungsdatei')),
                ('verified',
                 models.BooleanField(default=False,
                                     verbose_name='Verifiziert')),
                ('profile_picture',
                 models.ImageField(
                     null=True,
                     upload_to=account.models.profile_upload_path,
                     verbose_name='Profilbild')),
            ],
            options={
                'verbose_name': 'Tutordaten',
                'verbose_name_plural': 'Tutordaten',
            },
        ),
        migrations.CreateModel(
            name='TrackingDenyCounter',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('count', models.IntegerField(default=0)),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
Exemple #18
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_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')),
                ('email',
                 models.EmailField(db_index=True, max_length=254,
                                   unique=True)),
                ('user_type',
                 models.IntegerField(choices=[(0, 'ADMIN'), (1, 'PATIENT'),
                                              (2, 'DOCTOR')],
                                     default=1)),
                ('is_active', models.BooleanField(default=True)),
                ('is_staff', models.BooleanField(default=False)),
                ('is_superuser', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('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={
                'db_table': 'user',
            },
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=30)),
                ('surname', models.CharField(blank=True, max_length=30)),
                ('contact_number', models.CharField(blank=True,
                                                    max_length=10)),
                ('sex',
                 models.CharField(blank=True,
                                  choices=[('F', 'Female'), ('M', 'Male')],
                                  max_length=1)),
                ('addres', models.CharField(blank=True, max_length=30)),
                ('birth_date', models.DateField(blank=True, null=True)),
                ('weight', models.IntegerField(blank=True, null=True)),
                ('height', models.IntegerField(blank=True, null=True)),
                ('blood', models.CharField(blank=True, max_length=30)),
                ('image',
                 models.ImageField(blank=True,
                                   default='profile_img.png',
                                   upload_to=account.models.get_upload_path)),
                ('user',
                 models.OneToOneField(
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'profile',
            },
        ),
        migrations.CreateModel(
            name='Doctor',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=30)),
                ('surname', models.CharField(blank=True, max_length=35)),
                ('contact_number', models.CharField(blank=True,
                                                    max_length=10)),
                ('sex',
                 models.CharField(blank=True,
                                  choices=[('F', 'Female'), ('M', 'Male')],
                                  max_length=1)),
                ('patients',
                 models.ManyToManyField(related_name='doctors',
                                        to='account.Profile')),
                ('user',
                 models.OneToOneField(
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='doctor_profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Exemple #19
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Organization',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('organization_name',
                 models.CharField(max_length=150, null=True)),
                ('organization_address',
                 models.CharField(max_length=150, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='School',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('school_name', models.CharField(max_length=150, null=True)),
                ('school_address', models.CharField(max_length=150,
                                                    null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('is_verified', models.BooleanField(default=False)),
                ('user_name', models.CharField(max_length=50, null=True)),
                ('email', models.EmailField(max_length=254, null=True)),
                ('full_name', models.CharField(max_length=100, null=True)),
                ('birth_date', models.DateTimeField(null=True)),
                ('birth_place', models.CharField(max_length=100, null=True)),
                ('civil_status', models.CharField(max_length=100, null=True)),
                ('gender',
                 models.CharField(choices=[('M', 'Male'), ('F', 'Female')],
                                  default='M',
                                  max_length=1)),
                ('pylp_batch', models.IntegerField(null=True)),
                ('pylp_year',
                 models.IntegerField(
                     null=True,
                     validators=[
                         django.core.validators.MinValueValidator(1984),
                         account.models.max_value_current_year
                     ])),
                ('host_family', models.CharField(max_length=100, null=True)),
                ('present_address', models.CharField(max_length=150,
                                                     null=True)),
                ('permanent_address',
                 models.CharField(max_length=150, null=True)),
                ('current_work_affiliation',
                 models.CharField(max_length=100, null=True)),
                ('name_address_office_school',
                 models.CharField(max_length=150, null=True)),
                ('ethnicity', models.CharField(max_length=80, null=True)),
                ('religion', models.CharField(max_length=80, null=True)),
                ('facebook_account', models.CharField(max_length=80,
                                                      null=True)),
                ('contact_number',
                 phonenumber_field.modelfields.PhoneNumberField(max_length=128,
                                                                null=True,
                                                                region=None)),
                ('telephone_number',
                 phonenumber_field.modelfields.PhoneNumberField(max_length=128,
                                                                null=True,
                                                                region=None)),
                ('user',
                 models.OneToOneField(
                     editable=False,
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Profiles',
            },
        ),
        migrations.CreateModel(
            name='MembershipOrganization',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('inclusive_date', models.DateTimeField(null=True)),
                ('position_held', models.CharField(max_length=150, null=True)),
                ('organization',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='account.organization')),
                ('profile',
                 models.ForeignKey(editable=False,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='account.profile')),
            ],
            options={
                'verbose_name_plural': 'Membership in Youth Organizations',
            },
        ),
        migrations.CreateModel(
            name='EducationalBackground',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('education_type',
                 models.CharField(choices=[('E', 'Elementary'),
                                           ('H', 'High School'),
                                           ('C', 'College'),
                                           ('P', 'Post Graduate')],
                                  default='C',
                                  max_length=1)),
                ('inclusive_date', models.DateTimeField(null=True)),
                ('level_attained', models.CharField(max_length=150,
                                                    null=True)),
                ('profile',
                 models.ForeignKey(editable=False,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='account.profile')),
                ('school',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='account.school')),
            ],
            options={
                'verbose_name_plural': 'Educational Background',
            },
        ),
        migrations.CreateModel(
            name='CommunityActivity',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('activity_name', models.CharField(max_length=150, null=True)),
                ('activity_description',
                 models.CharField(max_length=150, null=True)),
                ('inclusive_date', models.DateTimeField(null=True)),
                ('profile',
                 models.ForeignKey(editable=False,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='account.profile')),
                ('sponsor_organization',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='account.organization')),
            ],
            options={
                'verbose_name_plural':
                'Involvement in Youth/Community Related Activities',
            },
        ),
    ]
Exemple #20
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')),
                ('full_name',
                 models.CharField(
                     max_length=50,
                     null=True,
                     validators=[
                         django.core.validators.RegexValidator(
                             message=
                             'Enter Valid Full Name Ex.shyam kumar yadav',
                             regex='[A-Za-z]*\\s[A-Za-z]*\\s[A-Za-z]*')
                     ],
                     verbose_name='Full Name')),
                ('email',
                 models.EmailField(max_length=255,
                                   unique=True,
                                   verbose_name='email ')),
                ('date_of_birth',
                 models.DateField(null=True, verbose_name='Data of Birth')),
                ('contactNo',
                 models.CharField(max_length=13,
                                  null=True,
                                  validators=[
                                      django.core.validators.RegexValidator(
                                          message='Enter Valid Phone Number.',
                                          regex='^[6-9]\\d{9}$')
                                  ],
                                  verbose_name='Phone Number')),
                ('state',
                 models.CharField(choices=[
                     (None, 'Select State'), ('AP', 'Andhra Pradesh'),
                     ('AR', 'Arunachal Pradesh'), ('AS', 'Assam'),
                     ('BR', 'Bihar'), ('CT', 'Chhattisgarh'), ('GA', 'Goa'),
                     ('GJ', 'Gujarat'), ('HR', 'Haryana'),
                     ('HP', 'Himachal Pradesh'), ('JH', 'Jharkhand'),
                     ('KA', 'Karnataka'), ('KL', 'Kerala'),
                     ('MP', 'Madhya Pradesh'), ('MH', 'Maharashtra'),
                     ('MN', 'Manipur'), ('ML', 'Meghalaya'), ('MZ', 'Mizoram'),
                     ('NL', 'Nagaland'), ('OR', 'Odisha'), ('PB', 'Punjab'),
                     ('RJ', 'Rajasthan'), ('SK', 'Sikkim'),
                     ('TN', 'Tamil Nadu'), ('TG', 'Telangana'),
                     ('TR', 'Tripura'), ('UT', 'Uttarakhand'),
                     ('UP', 'Uttar Pradesh'), ('WB', 'West Bengal'),
                     ('AN', 'Andaman and Nicobar Islands'),
                     ('CH', 'Chandigarh'), ('DB', 'Dadra and Nagar Haveli'),
                     ('DD', 'Daman and Diu'), ('DL', 'Delhi'),
                     ('JK', 'Jammu and Kashmir'), ('LA', 'Ladakh'),
                     ('LD', 'Lakshadweep'), ('PY', 'Puducherry')
                 ],
                                  max_length=2,
                                  null=True,
                                  verbose_name='State')),
                ('city',
                 models.CharField(max_length=20,
                                  null=True,
                                  validators=[
                                      django.core.validators.RegexValidator(
                                          message='Enter Valid city.',
                                          regex='^\\w[A-Za-z ]+$')
                                  ],
                                  verbose_name='City')),
                ('pincode',
                 models.CharField(max_length=6,
                                  null=True,
                                  validators=[
                                      django.core.validators.RegexValidator(
                                          message='Enter Valid pincode.',
                                          regex='^\\d{6}$')
                                  ],
                                  verbose_name='Pincode')),
                ('full_address',
                 models.TextField(max_length=50,
                                  null=True,
                                  verbose_name='Full Address')),
                ('profile',
                 models.FileField(
                     blank=True,
                     default='Member_Img/default_user.jpg.',
                     upload_to=account.models.upload_to_user,
                     validators=[
                         django.core.validators.FileExtensionValidator(
                             allowed_extensions=[
                                 'blp', 'bmp', 'dib', 'bufr', 'cur', 'pcx',
                                 'dcx', 'dds', 'ps', 'eps', 'fit', 'fits',
                                 'fli', 'flc', 'ftc', 'ftu', 'gbr', 'gif',
                                 'grib', 'h5', 'hdf', 'png', 'apng', 'jp2',
                                 'j2k', 'jpc', 'jpf', 'jpx', 'j2c', 'icns',
                                 'ico', 'im', 'iim', 'tif', 'tiff', 'jfif',
                                 'jpe', 'jpg', 'jpeg', 'mpg', 'mpeg', 'mpo',
                                 'msp', 'palm', 'pcd', 'pdf', 'pxr', 'pbm',
                                 'pgm', 'ppm', 'pnm', 'psd', 'bw', 'rgb',
                                 'rgba', 'sgi', 'ras', 'tga', 'icb', 'vda',
                                 'vst', 'webp', 'wmf', 'emf', 'xbm', 'xpm'
                             ],
                             message='Select valid Image.')
                     ])),
                ('is_active', models.BooleanField(default=True)),
                ('is_admin', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
Exemple #21
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_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')),
                ('email',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='Email')),
                ('first_name',
                 models.CharField(max_length=255,
                                  null=True,
                                  verbose_name='First Name')),
                ('last_name',
                 models.CharField(max_length=255,
                                  null=True,
                                  verbose_name='Last Name')),
                ('role',
                 models.IntegerField(choices=[(1, 'Viewer'), (2, 'Editor'),
                                              (3, 'Admin')],
                                     default=1)),
                ('is_staff', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('is_admin', models.BooleanField(default=False)),
                ('date_joined', models.DateTimeField(auto_now_add=True)),
                ('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', account.models.UserManager()),
            ],
        ),
    ]
Exemple #22
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=100, unique=True, verbose_name='email')),
                ('viewpass', models.CharField(blank=True, max_length=30, null=True)),
                ('name', models.CharField(max_length=100)),
                ('contact_number', models.IntegerField(blank=True, default=0, null=True)),
                ('is_superuser', models.BooleanField(default=False)),
                ('is_admin', models.BooleanField(default=False)),
                ('is_Vendor', models.BooleanField(default=False)),
                ('is_Blogger', models.BooleanField(default=False)),
                ('is_Affiliate', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('is_staff', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='BloggerAccount',
            fields=[
                ('blogger', models.OneToOneField(default=None, on_delete=django.db.models.deletion.DO_NOTHING, primary_key=True, serialize=False, to='account.account')),
                ('email', models.EmailField(max_length=100, verbose_name='email')),
                ('plan', models.CharField(default='no active plan', max_length=20)),
                ('subscripton_amount', models.IntegerField(blank=True, null=True)),
                ('blogname', models.CharField(max_length=30, unique=True)),
                ('bio', models.CharField(blank=True, max_length=150, null=True)),
                ('address', models.CharField(max_length=100)),
                ('city', models.CharField(max_length=30)),
                ('state', models.CharField(max_length=20)),
                ('template', models.CharField(default='default,default', max_length=20)),
                ('logo', models.ImageField(default='/default-img/titlelogo.png', upload_to=account.models.get_uplaod_file_name_blog)),
                ('corousel1', models.ImageField(default='/default-img/main-slider1.jpg', upload_to=account.models.get_uplaod_file_name_blog)),
                ('corousel2', models.ImageField(default='/default-img/main-slider2.jpg', upload_to=account.models.get_uplaod_file_name_blog)),
                ('corousel3', models.ImageField(default='/default-img/main-slider3.jpg', upload_to=account.models.get_uplaod_file_name_blog)),
                ('corousel4', models.ImageField(default='/default-img/slider1.jpg', upload_to=account.models.get_uplaod_file_name_blog)),
                ('corousel5', models.ImageField(default='/default-img/main-slider1.jpg', upload_to=account.models.get_uplaod_file_name_blog)),
                ('corousel6', models.ImageField(default='/default-img/slider1.jpg', upload_to=account.models.get_uplaod_file_name_blog)),
                ('corousel7', models.ImageField(default='/default-img/slider2.jpg', upload_to=account.models.get_uplaod_file_name_blog)),
                ('corousel8', models.ImageField(default='/default-img/slider4.jpg', upload_to=account.models.get_uplaod_file_name_blog)),
                ('subscription_active', models.BooleanField(default=False)),
                ('is_blocked', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='VendorAccount',
            fields=[
                ('vendor', models.OneToOneField(default=None, on_delete=django.db.models.deletion.DO_NOTHING, primary_key=True, serialize=False, to='account.account')),
                ('email', models.EmailField(max_length=100, verbose_name='email')),
                ('shop_number', models.IntegerField(blank=True, null=True)),
                ('plan', models.CharField(default='no active plan', max_length=20)),
                ('template', models.CharField(default='default,default', max_length=20)),
                ('subscripton_amount', models.IntegerField(blank=True, null=True)),
                ('shop_name', models.CharField(max_length=150, unique=True)),
                ('shop_add', models.CharField(max_length=100)),
                ('city', models.CharField(max_length=30)),
                ('state', models.CharField(max_length=20)),
                ('gst', models.CharField(blank=True, max_length=30, null=True)),
                ('logo', models.ImageField(default='/default-img/titlelogo.png', upload_to=account.models.get_uplaod_file_name)),
                ('corousel1', models.ImageField(default='/default-img/main-slider1.jpg', upload_to=account.models.get_uplaod_file_name)),
                ('corousel2', models.ImageField(default='/default-img/main-slider2.jpg', upload_to=account.models.get_uplaod_file_name)),
                ('corousel3', models.ImageField(default='/default-img/main-slider3.jpg', upload_to=account.models.get_uplaod_file_name)),
                ('corousel4', models.ImageField(default='/default-img/slider1.jpg', upload_to=account.models.get_uplaod_file_name)),
                ('corousel5', models.ImageField(default='/default-img/main-slider1.jpg', upload_to=account.models.get_uplaod_file_name)),
                ('corousel6', models.ImageField(default='/default-img/slider1.jpg', upload_to=account.models.get_uplaod_file_name)),
                ('corousel7', models.ImageField(default='/default-img/slider2.jpg', upload_to=account.models.get_uplaod_file_name)),
                ('corousel8', models.ImageField(default='/default-img/slider4.jpg', upload_to=account.models.get_uplaod_file_name)),
                ('subscription_active', models.BooleanField(default=False)),
                ('is_blocked', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
            ],
        ),
    ]
Exemple #23
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='UserGroup',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(max_length=60,
                                  unique=True,
                                  verbose_name='Название группы')),
                ('description',
                 models.TextField(max_length=255,
                                  verbose_name='Описание группы')),
            ],
            options={
                'verbose_name': 'Группа пользователей',
                'verbose_name_plural': 'Группы пользователей',
            },
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('username',
                 models.CharField(max_length=30,
                                  unique=True,
                                  verbose_name='Логин')),
                ('slug',
                 models.SlugField(max_length=30,
                                  unique=True,
                                  verbose_name='URL')),
                ('email',
                 models.EmailField(max_length=60,
                                   unique=True,
                                   verbose_name='Почта')),
                ('password',
                 models.CharField(max_length=100, verbose_name='Пароль')),
                ('userpic',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=account.models.User.profile_pic,
                                   verbose_name='Картинка профиля')),
                ('date_joined',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='Дата создания')),
                ('last_login',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='Дата последнего входа')),
                ('is_admin',
                 models.BooleanField(default=False, verbose_name='Админ.')),
                ('is_active',
                 models.BooleanField(default=True, verbose_name='Активен')),
                ('is_staff',
                 models.BooleanField(default=False, verbose_name='Персонал')),
                ('is_superuser', models.BooleanField(default=False)),
                ('usergroup',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='account.UserGroup',
                                   verbose_name='Группа')),
            ],
            options={
                'verbose_name': 'Пользователь',
                'verbose_name_plural': 'Пользователи',
            },
        ),
    ]
Exemple #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')),
                ('email',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='email address')),
                ('username',
                 models.CharField(blank=True,
                                  max_length=100,
                                  verbose_name='user 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')),
                ('is_manager',
                 models.BooleanField(default=False,
                                     verbose_name='manager status')),
                ('photo',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to='profile_photo/')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
            },
            managers=[
                ('objects', account.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=100,
                                  verbose_name='company name')),
                ('address',
                 models.CharField(max_length=255,
                                  verbose_name='company address')),
                ('created_at',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='created at')),
                ('updated_at',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='updated at')),
            ],
        ),
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=100, verbose_name='group name')),
                ('created_at',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='created at')),
                ('updated_at',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='updated at')),
                ('company',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   related_name='groups',
                                   to='account.Company')),
            ],
        ),
        migrations.AddField(
            model_name='user',
            name='admin_group',
            field=models.ManyToManyField(blank=True,
                                         related_name='admin_users',
                                         to='account.Group'),
        ),
        migrations.AddField(
            model_name='user',
            name='group',
            field=models.ManyToManyField(blank=True,
                                         related_name='users',
                                         to='account.Group'),
        ),
        migrations.AddField(
            model_name='user',
            name='groups',
            field=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'),
        ),
        migrations.AddField(
            model_name='user',
            name='user_permissions',
            field=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'),
        ),
    ]
Exemple #25
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Lab',
            fields=[
                ('name',
                 models.CharField(max_length=200,
                                  primary_key=True,
                                  serialize=False,
                                  unique=True)),
                ('contact_email',
                 models.EmailField(blank=True, max_length=200, null=True)),
                ('contact_phone',
                 models.CharField(blank=True, max_length=20, null=True)),
                ('status', models.IntegerField(default=0)),
                ('location', models.TextField(default='unknown')),
                ('api_token', models.CharField(max_length=50)),
                ('lab_user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('timezone', models.CharField(default='UTC', max_length=100)),
                ('ssh_public_key',
                 models.FileField(blank=True,
                                  null=True,
                                  upload_to=account.models.upload_to)),
                ('pgp_public_key',
                 models.FileField(blank=True,
                                  null=True,
                                  upload_to=account.models.upload_to)),
                ('email_addr',
                 models.CharField(default='*****@*****.**', max_length=300)),
                ('company', models.CharField(max_length=200)),
                ('oauth_token', models.CharField(max_length=1024)),
                ('oauth_secret', models.CharField(max_length=1024)),
                ('jira_url', models.CharField(default='', max_length=100)),
                ('full_name', models.CharField(default='', max_length=100)),
                ('booking_privledge', models.BooleanField(default=False)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'user_profile',
            },
        ),
        migrations.CreateModel(
            name='VlanManager',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('vlans', models.TextField()),
                ('block_size', models.IntegerField()),
                ('allow_overlapping', models.BooleanField()),
                ('reserved_vlans', models.TextField()),
            ],
        ),
        migrations.AddField(
            model_name='lab',
            name='vlan_manager',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='account.VlanManager'),
        ),
    ]
Exemple #26
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')),
                ('email', models.EmailField(max_length=60, unique=True, verbose_name='email')),
                ('username', models.CharField(max_length=50, verbose_name='name')),
                ('date_joined', models.DateTimeField(auto_now_add=True, verbose_name='date joined')),
                ('last_login', models.DateTimeField(auto_now=True, verbose_name='last login')),
                ('is_admin', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('is_staff', models.BooleanField(default=False)),
                ('is_superuser', models.BooleanField(default=False)),
                ('is_recruitment_applicant', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
            managers=[
                ('objects', account.models.MyAccountManager()),
            ],
        ),
        migrations.CreateModel(
            name='SandArtReg',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('team_name', models.CharField(max_length=50, unique=True, verbose_name='Team Name')),
                ('college', models.CharField(max_length=50, verbose_name='College/University Name')),
                ('mem1', models.CharField(max_length=30, verbose_name='First Member Name')),
                ('mem2', models.CharField(blank=True, max_length=30, verbose_name='Second Member Name')),
                ('mem3', models.CharField(blank=True, max_length=30, verbose_name='Third Member Name')),
                ('mem4', models.CharField(blank=True, max_length=30, verbose_name='Fourth Member Name')),
                ('mem5', models.CharField(blank=True, max_length=30, verbose_name='Fifth Member Name')),
                ('mem6', models.CharField(blank=True, max_length=30, verbose_name='Sixth Member Name')),
                ('phone_number', models.CharField(max_length=17, validators=[django.core.validators.RegexValidator(message='Invalid phone number', regex='^(?:(?:\\+|0{0,2})91(\\s*[\\-]\\s*)?|[0]?)?[789]\\d{9}$')], verbose_name='Phone Number')),
                ('email', models.EmailField(max_length=254)),
            ],
        ),
        migrations.CreateModel(
            name='Volunteer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20, verbose_name='Name')),
                ('roll_number', models.CharField(max_length=9, unique=True, verbose_name='Roll Number')),
                ('hostel_block', models.CharField(choices=[('First Block', 'First Block'), ('Second Block', 'Second Block'), ('Third Block', 'Third Block'), ('Fourth Block', 'Fourth Block'), ('Fifth Block', 'Fifth Block'), ('Seventh Block', 'Seventh Block'), ('Mega Tower 1', 'Mega Tower 1'), ('Mega Tower 2', 'Mega Tower 2'), ('Mega Tower 3', 'Mega Tower 3'), ('GH1', 'GH1'), ('GH3', 'GH3'), ('GH4', 'GH4'), ('GH5', 'GH5')], max_length=30)),
                ('batch', models.CharField(choices=[('first_year', 'First Year'), ('second_year', 'Second Year'), ('third_year', 'Third Year'), ('final_year', 'Final Year'), ('pg', 'PG')], default='firstYear', max_length=20, verbose_name='Batch')),
                ('phone_number', models.CharField(max_length=17, validators=[django.core.validators.RegexValidator(message='Invalid phone number', regex='^(?:(?:\\+|0{0,2})91(\\s*[\\-]\\s*)?|[0]?)?[789]\\d{9}$')], verbose_name='Phone Number')),
                ('event', models.CharField(blank=True, choices=[('Engineer', 'Engineer'), ('Incident', 'Incident'), ('Major Project', 'Major Project')], max_length=20, verbose_name='event')),
            ],
        ),
        migrations.CreateModel(
            name='RecruitmentApplicant',
            fields=[
                ('application_id', models.IntegerField(primary_key=True, serialize=False, verbose_name='application id')),
                ('name', models.CharField(max_length=50, verbose_name='name')),
                ('roll_number', models.CharField(max_length=10, unique=True)),
                ('batch', models.CharField(choices=[('firstYear', 'First Year'), ('secondYear', 'Second Year'), ('thirdYear', 'Third Year'), ('fourthYear', 'Final Year'), ('PostGraduate', 'PG')], max_length=20, verbose_name='Batch')),
                ('branch', models.CharField(choices=[('CSE', 'Computer Science'), ('IT', 'Information Technology'), ('ECE', 'Electronics and Communication'), ('EEE', 'Electronics and Electrical'), ('MECH', 'Mechanical'), ('CV', 'Civil'), ('CH', 'Chemical'), ('META', 'Metallurgy and Materials')], max_length=20, verbose_name='Branch')),
                ('status', models.CharField(choices=[('written', 'Written Test'), ('interview', 'Selected for Interview'), ('selected', 'Selected')], default='written', max_length=20, verbose_name='Status')),
                ('phoneNumber', models.CharField(blank=True, max_length=17, validators=[django.core.validators.RegexValidator(message='Incorrect phone number format', regex='^(?:(?:\\+|0{0,2})91(\\s*[\\-]\\s*)?|[0]?)?[789]\\d{9}$')], verbose_name='Phone Number')),
                ('email', models.EmailField(max_length=60, unique=True, verbose_name='email')),
                ('recruitmentYear', models.CharField(default=2021, max_length=4)),
                ('applicant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applicant', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
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')),
                ('created',
                 models.DateTimeField(auto_now_add=True,
                                      db_index=True,
                                      verbose_name='created')),
                ('modified', models.DateTimeField(auto_now=True)),
                ('deleted', models.DateTimeField(editable=False, null=True)),
                ('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(
                     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')),
                ('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')),
                ('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',
                'ordering': ['-id'],
                'get_latest_by': 'id',
                'abstract': False,
                'base_manager_name': 'objects',
                'default_manager_name': 'objects',
            },
            managers=[
                ('data', account.models.UserDataManager()),
                ('objects', account.models.UserDataManager()),
            ],
        ),
    ]
Exemple #28
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')),
                ('username',
                 models.CharField(max_length=30,
                                  unique=True,
                                  verbose_name='username')),
                ('nickname',
                 models.CharField(max_length=30,
                                  unique=True,
                                  verbose_name='Nickname')),
                ('Photo',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to='account/%Y/%m/%d',
                                   verbose_name='Nickname')),
                ('in_short',
                 models.CharField(blank=True,
                                  default='작성한 한마디가 없습니다.',
                                  max_length=255,
                                  verbose_name='In short')),
                ('level',
                 models.IntegerField(default=1, verbose_name='In short')),
                ('code',
                 models.CharField(default='Z0',
                                  max_length=30,
                                  verbose_name='code')),
                ('exp', models.IntegerField(default=0,
                                            verbose_name='In short')),
                ('point', models.IntegerField(default=0,
                                              verbose_name='Point')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='Date joined')),
                ('is_active',
                 models.BooleanField(default=True, verbose_name='active')),
                ('is_staff', models.BooleanField(default=False)),
                ('is_superuser', 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',
                'ordering': ('-date_joined', ),
            },
            managers=[
                ('objects', account.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Profil',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('email',
                 models.EmailField(max_length=255,
                                   unique=True,
                                   verbose_name='Email address')),
                ('phone_number',
                 models.CharField(max_length=12, verbose_name='Phone Number')),
                ('address', models.TextField(blank=True,
                                             verbose_name='Address')),
            ],
        ),
    ]
Exemple #29
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')),
                ('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')),
                ('is_business', models.BooleanField(default=False)),
                ('is_startup', 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', account.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Business',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('company_name', models.CharField(blank=True, max_length=30)),
                ('nuit', models.CharField(blank=True, max_length=30)),
                ('phone_number', models.CharField(blank=True, max_length=30)),
                ('website', models.URLField()),
                ('address', models.CharField(blank=True, max_length=30)),
                ('province', models.CharField(blank=True, max_length=30)),
                ('location', models.CharField(blank=True, max_length=30)),
                ('created_date',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('uploaded_at', models.DateTimeField(blank=True, null=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Api',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('live_api',
                 models.CharField(default='b71540463ab117ce76b96e94bca3cbcd',
                                  editable=False,
                                  max_length=32,
                                  unique=True)),
                ('test_api',
                 models.CharField(default='b4f5ab7682a388ee64daa81d9d79ff06',
                                  editable=False,
                                  max_length=32,
                                  unique=True)),
                ('is_active', models.BooleanField(default=False)),
                ('created_date',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('uploaded_at', models.DateTimeField(blank=True, null=True)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Exemple #30
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('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(
                     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')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  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)),
                ('question_history', models.CharField(max_length=500,
                                                      null=True)),
                ('profile_pic',
                 models.CharField(default=account.models.random_profile_color,
                                  max_length=7)),
                ('friends',
                 models.ManyToManyField(blank=True,
                                        related_name='_user_friends_+',
                                        to=settings.AUTH_USER_MODEL)),
                ('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={
                'ordering': ['id'],
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='FriendRequest',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('accepted', models.BooleanField(null=True)),
                ('requestee',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='received_friend_requests',
                                   to=settings.AUTH_USER_MODEL)),
                ('requester',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='sent_friend_requests',
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-updated_at'],
            },
        ),
        migrations.AddIndex(
            model_name='friendrequest',
            index=models.Index(fields=['-updated_at'],
                               name='account_fri_updated_eb691a_idx'),
        ),
        migrations.AddConstraint(
            model_name='friendrequest',
            constraint=models.UniqueConstraint(fields=('requester',
                                                       'requestee'),
                                               name='unique_friend_request'),
        ),
        migrations.AddIndex(
            model_name='user',
            index=models.Index(fields=['id'],
                               name='account_use_id_ef0f90_idx'),
        ),
        migrations.AddIndex(
            model_name='user',
            index=models.Index(fields=['username'],
                               name='account_use_usernam_19aad5_idx'),
        ),
    ]