Ejemplo n.º 1
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')),
                ('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', accounts.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('role',
                 models.PositiveSmallIntegerField(blank=True,
                                                  choices=[(1, 'Member'),
                                                           (2, 'Genius'),
                                                           (3, 'SuperVisor')],
                                                  null=True)),
                ('phone_number', models.CharField(max_length=11)),
                ('national_code', models.CharField(max_length=10)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Ejemplo n.º 2
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    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')),
                ('email', models.EmailField(max_length=255, unique=True, verbose_name='email address')),
                ('media', models.ImageField(blank=True, null=True, upload_to=accounts.models.download_profile_location)),
                ('description', models.TextField(blank=True, default='', null=True)),
                ('name', models.CharField(blank=True, default='', max_length=10, null=True)),
                ('phone', models.CharField(blank=True, default='', max_length=13, null=True)),
                ('sex', models.CharField(choices=[('male', '\ub0a8\uc790'), ('female', '\uc5ec\uc790')], max_length=15, null=True)),
                ('address', models.CharField(default='', max_length=15, null=True)),
                ('job', models.CharField(blank=True, default='', max_length=15, null=True)),
                ('birth_year', models.PositiveIntegerField(null=True)),
                ('agree_purchase_info_email', models.BooleanField(default=True)),
                ('agree_purchase_info_SMS', models.BooleanField(default=False)),
                ('agree_selling_info_email', models.BooleanField(default=True)),
                ('agree_selling_info_SMS', models.BooleanField(default=True)),
                ('agree_marketing_info_email', models.BooleanField(default=True)),
                ('agree_marketing_info_SMS', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('is_admin', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MyUserThumbnail',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('thumb_type', models.CharField(choices=[('hd', 'HD'), ('sd', 'SD'), ('micro', 'Micro')], default='hd', max_length=20)),
                ('height', models.CharField(blank=True, max_length=20, null=True)),
                ('width', models.CharField(blank=True, max_length=20, null=True)),
                ('media', models.ImageField(blank=True, height_field='height', null=True, upload_to=accounts.models.thumbnail_location, width_field='width')),
                ('myuser', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Seller',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('maxWorking', models.PositiveIntegerField(default=0)),
                ('description', models.TextField(blank=True, null=True)),
                ('phone', models.CharField(max_length=12)),
                ('rating', models.DecimalField(decimal_places=2, default=0.0, max_digits=3)),
                ('is_active', models.BooleanField(default=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('total_num_heart', models.PositiveIntegerField(default=0)),
                ('type', models.CharField(choices=[('individual', '\uac1c\uc778'), ('personal_business', '\uac1c\uc778\uc0ac\uc5c5\uc790'), ('corporate_business', '\ubc95\uc778\uc0ac\uc5c5\uc790')], default='individual', max_length=20, null=True)),
                ('company_name', models.CharField(blank=True, default='', max_length=12, null=True)),
                ('representative_name', models.CharField(blank=True, default='', max_length=12, null=True)),
                ('corporate_number', models.CharField(default='', max_length=12, null=True)),
                ('business_field', models.CharField(blank=True, default='', max_length=12, null=True)),
                ('company_type', models.CharField(blank=True, default='', max_length=12, null=True)),
                ('business_license', models.ImageField(blank=True, null=True, upload_to='/Users/jaewon/Project/socialup/socialup/settings/../../media/business_license/')),
                ('account_copy', models.ImageField(blank=True, null=True, upload_to='/Users/jaewon/Project/socialup/socialup/settings/../../media/account_copy/')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='SellerAccount',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('account_number', models.CharField(blank=True, default='', max_length=120, null=True)),
                ('account_name', models.CharField(blank=True, default='', max_length=50, null=True)),
                ('bank', models.CharField(blank=True, choices=[('\uae30\uc5c5\uc740\ud589', '\uae30\uc5c5\uc740\ud589'), ('\uad6d\ubbfc\uc740\ud589', '\uad6d\ubbfc\uc740\ud589'), ('\uc678\ud658\uc740\ud589', '\uc678\ud658\uc740\ud589'), ('\uc218\ud611\uc911\uc559\ud68c', '\uc218\ud611\uc911\uc559\ud68c'), ('\ub18d\ud611\uc911\uc559\ud68c', '\ub18d\ud611\uc911\uc559\ud68c'), ('\uc6b0\ub9ac\uc740\ud589', '\uc6b0\ub9ac\uc740\ud589'), ('SC\uc81c\uc77c\uc740\ud589', 'SC\uc81c\uc77c\uc740\ud589'), ('\ub300\uad6c\uc740\ud589', '\ub300\uad6c\uc740\ud589'), ('\ubd80\uc0b0\uc740\ud589', '\ubd80\uc0b0\uc740\ud589'), ('\uad11\uc8fc\uc740\ud589', '\uad11\uc8fc\uc740\ud589'), ('\uc804\ubd81\uc740\ud589', '\uc804\ubd81\uc740\ud589'), ('\uacbd\ub0a8\uc740\ud589', '\uacbd\ub0a8\uc740\ud589'), ('\ud55c\uad6d\uc528\ud2f0\uc740\ud589', '\ud55c\uad6d\uc528\ud2f0\uc740\ud589'), ('\uc6b0\uccb4\uad6d', '\uc6b0\uccb4\uad6d'), ('\ud558\ub098\uc740\ud589', '\ud558\ub098\uc740\ud589'), ('\ud1b5\ud569\uc2e0\ud55c\uc740\ud589(\uc2e0\ud55c,\uc870\ud765\uc740\ud589)', '\ud1b5\ud569\uc2e0\ud55c\uc740\ud589(\uc2e0\ud55c,\uc870\ud765\uc740\ud589)'), ('\uc720\uc548\ud0c0\uc99d\uad8c(\uad6c \ub3d9\uc591\uc99d\uad8c)', '\uc720\uc548\ud0c0\uc99d\uad8c(\uad6c \ub3d9\uc591\uc99d\uad8c)'), ('\ud604\ub300\uc99d\uad8c', '\ud604\ub300\uc99d\uad8c'), ('\ubbf8\ub798\uc5d0\uc14b\uc99d\uad8c', '\ubbf8\ub798\uc5d0\uc14b\uc99d\uad8c'), ('\ud55c\uad6d\ud22c\uc790\uc99d\uad8c', '\ud55c\uad6d\ud22c\uc790\uc99d\uad8c'), ('\uc6b0\ub9ac\ud22c\uc790\uc99d\uad8c', '\uc6b0\ub9ac\ud22c\uc790\uc99d\uad8c'), ('\ud558\uc774\ud22c\uc790\uc99d\uad8c', '\ud558\uc774\ud22c\uc790\uc99d\uad8c'), ('HMC\ud22c\uc790\uc99d\uad8c', 'HMC\ud22c\uc790\uc99d\uad8c'), ('SK\uc99d\uad8c', 'SK\uc99d\uad8c'), ('\ub300\uc2e0\uc99d\uad8c', '\ub300\uc2e0\uc99d\uad8c'), ('\ud558\ub098\ub300\ud22c\uc99d\uad8c', '\ud558\ub098\ub300\ud22c\uc99d\uad8c'), ('\uad7f\ubaa8\ub2dd\uc2e0\ud55c\uc99d\uad8c', '\uad7f\ubaa8\ub2dd\uc2e0\ud55c\uc99d\uad8c'), ('\ub3d9\ubd80\uc99d\uad8c', '\ub3d9\ubd80\uc99d\uad8c'), ('\uc720\uc9c4\ud22c\uc790\uc99d\uad8c', '\uc720\uc9c4\ud22c\uc790\uc99d\uad8c'), ('\uba54\ub9ac\uce20\uc99d\uad8c', '\uba54\ub9ac\uce20\uc99d\uad8c'), ('\uc2e0\uc601\uc99d\uad8c', '\uc2e0\uc601\uc99d\uad8c'), ('\ud55c\uad6d\uc528\ud2f0\uc740\ud589(\ud55c\ubbf8\uc740\ud589)', '\ud55c\uad6d\uc528\ud2f0\uc740\ud589 (\ud55c\ubbf8\uc740\ud589)')], default='', max_length=120, null=True)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('seller', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='accounts.Seller')),
            ],
        ),
        migrations.CreateModel(
            name='Withdrawal',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('money', models.PositiveIntegerField(default=0)),
                ('status', models.CharField(choices=[('request', '\ucd9c\uae08\uc694\uccad'), ('completed', '\ucd9c\uae08\uc644\ub8cc'), ('rejected', '\ucd9c\uae08\uac70\uc808')], max_length=15, null=True)),
                ('reject_reason', models.CharField(blank=True, max_length=255, null=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('timestamp', models.DateTimeField(auto_now=True)),
                ('seller', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='accounts.Seller')),
            ],
        ),
    ]
Ejemplo n.º 3
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('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')),
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  primary_key=True,
                                  serialize=False)),
                ('username',
                 models.CharField(max_length=128,
                                  unique=True,
                                  verbose_name='Username')),
                ('name', models.CharField(max_length=128,
                                          verbose_name='Name')),
                ('email',
                 models.EmailField(max_length=128,
                                   unique=True,
                                   verbose_name='Email')),
                ('role',
                 models.CharField(blank=True,
                                  choices=[('Admin', 'Administrator'),
                                           ('User', 'User'),
                                           ('App', 'Application'),
                                           ('Auditor', 'Auditor')],
                                  default='User',
                                  max_length=10,
                                  verbose_name='Role')),
                ('avatar',
                 models.ImageField(null=True,
                                   upload_to='avatar',
                                   verbose_name='Avatar')),
                ('wechat',
                 models.CharField(blank=True,
                                  max_length=128,
                                  verbose_name='Wechat')),
                ('phone',
                 models.CharField(blank=True,
                                  max_length=20,
                                  null=True,
                                  verbose_name='Phone')),
                ('comment',
                 models.TextField(blank=True,
                                  null=True,
                                  verbose_name='Comment')),
                ('is_first_login', models.BooleanField(default=True)),
                ('created_by',
                 models.CharField(default='',
                                  max_length=30,
                                  verbose_name='Created by')),
                ('date_password_last_updated',
                 models.DateTimeField(
                     auto_now_add=True,
                     null=True,
                     verbose_name='Date password last updated')),
                ('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',
                'ordering': ['username'],
            },
            bases=(accounts.models.RoleMixin, models.Model),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
Ejemplo n.º 4
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')),
                ('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(db_index=True,
                                   max_length=254,
                                   unique=True,
                                   verbose_name='email address')),
                ('mobile',
                 models.CharField(blank=True,
                                  max_length=14,
                                  verbose_name='mobile_number')),
                ('image',
                 models.ImageField(upload_to='user/image/',
                                   verbose_name='image')),
                ('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',
            },
            managers=[
                ('objects', accounts.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='UserEmail',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('Subject',
                 models.CharField(max_length=150, verbose_name='Subject')),
                ('body', models.TextField(verbose_name='body')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'UserEmail',
                'verbose_name_plural': 'UserEmails',
            },
        ),
        migrations.CreateModel(
            name='Shop',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=150,
                                          verbose_name='Name')),
                ('description',
                 models.CharField(max_length=256, verbose_name='description')),
                ('slug', models.SlugField(verbose_name='slug')),
                ('image',
                 models.ImageField(upload_to='shop/image/',
                                   verbose_name='image')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'shop',
                'verbose_name_plural': 'shops',
            },
        ),
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('city', models.CharField(max_length=50, verbose_name='City')),
                ('street',
                 models.CharField(max_length=100, verbose_name='street')),
                ('alley', models.CharField(max_length=100,
                                           verbose_name='alley')),
                ('zip_code',
                 models.CharField(max_length=10, verbose_name='zip code')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'address',
                'verbose_name_plural': 'addresses',
            },
        ),
    ]
Ejemplo n.º 5
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')),
                ('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,
            },
            bases=(guardian.mixins.GuardianUserMixin, models.Model),
            managers=[
                ('objects', accounts.models.CustomUserManager()),
            ],
        ),
        migrations.CreateModel(
            name='HistoricalGroupDescription',
            fields=[
                ('id',
                 models.IntegerField(auto_created=True,
                                     blank=True,
                                     db_index=True,
                                     verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=300)),
                ('slug',
                 models.SlugField(
                     help_text='URL-safe identifier for the group.',
                     max_length=300,
                     validators=[
                         django.core.validators.RegexValidator(
                             inverse_match=True,
                             message="The slug cannot be 'create'.",
                             regex='^create$')
                     ])),
                ('description',
                 django_bleach.models.BleachField(
                     blank=True,
                     help_text=
                     'An HTML description of the group. The following tags are allowed: h3, p, a, abbr, cite, code, small, em, strong, sub, sup, u, ul, ol, li.'
                 )),
                ('history_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('history_date', models.DateTimeField()),
                ('history_change_reason',
                 models.CharField(max_length=100, null=True)),
                ('history_type',
                 models.CharField(choices=[('+', 'Created'), ('~', 'Changed'),
                                           ('-', 'Deleted')],
                                  max_length=1)),
                ('group',
                 models.ForeignKey(
                     blank=True,
                     db_constraint=False,
                     null=True,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     related_name='+',
                     to='auth.Group')),
                ('history_user',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='+',
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'historical group description',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='GroupDescription',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=300, unique=True)),
                ('slug',
                 models.SlugField(
                     help_text='URL-safe identifier for the group.',
                     max_length=300,
                     unique=True,
                     validators=[
                         django.core.validators.RegexValidator(
                             inverse_match=True,
                             message="The slug cannot be 'create'.",
                             regex='^create$')
                     ])),
                ('description',
                 django_bleach.models.BleachField(
                     blank=True,
                     help_text=
                     'An HTML description of the group. The following tags are allowed: h3, p, a, abbr, cite, code, small, em, strong, sub, sup, u, ul, ol, li.'
                 )),
                ('group',
                 models.OneToOneField(
                     blank=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to='auth.Group')),
            ],
        ),
    ]
Ejemplo n.º 6
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
        ('pontocoleta', '0001_initial'),
    ]

    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')),
                ('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='E-mail')),
                ('first_name',
                 models.CharField(max_length=50, verbose_name='Nome')),
                ('last_name',
                 models.CharField(max_length=50, verbose_name='Sobrenome')),
                ('cpf',
                 models.CharField(blank=True,
                                  max_length=15,
                                  null=True,
                                  verbose_name='CPF')),
                ('fone',
                 models.CharField(max_length=15, verbose_name='Telefone')),
                ('adress',
                 models.CharField(max_length=100, verbose_name='Endereço')),
                ('adress_number',
                 models.CharField(max_length=6, verbose_name='Numero')),
                ('city', models.CharField(max_length=30,
                                          verbose_name='Cidade')),
                ('uf',
                 models.CharField(choices=[('AC', 'Acre'), ('AL', 'Alagoas'),
                                           ('AP', 'Amapá'), ('AM', 'Amazonas'),
                                           ('BA', 'Bahia'), ('CE', 'Ceará'),
                                           ('DF', 'Distrito Federal'),
                                           ('ES', 'Espírito Santo'),
                                           ('GO', 'Goiás'), ('MA', 'Maranhão'),
                                           ('MT', 'Mato Grosso'),
                                           ('MS', 'Mato Grosso do Sul'),
                                           ('MG', 'Minas Gerais'),
                                           ('PA', 'Pará'), ('PB', 'Paraíba'),
                                           ('PR', 'Paraná'),
                                           ('PE', 'Pernambuco'),
                                           ('PI', 'Piauí'),
                                           ('RJ', 'Rio de Janeiro'),
                                           ('RN', 'Rio Grande do Norte'),
                                           ('RS', 'Rio Grande do Sul'),
                                           ('RO', 'Rondônia'),
                                           ('RR', 'Roraima'),
                                           ('SC', 'Santa Catarina'),
                                           ('SP', 'São Paulo'),
                                           ('SE', 'Sergipe'),
                                           ('TO', 'Tocantins')],
                                  default='SP',
                                  max_length=2,
                                  verbose_name='Estado')),
                ('is_staff',
                 models.BooleanField(default=False,
                                     verbose_name='Membro da Equipe')),
                ('is_donor',
                 models.BooleanField(default=False, verbose_name='Doador')),
                ('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': 'Usuário',
                'verbose_name_plural': 'Usuários',
            },
            managers=[
                ('objects', accounts.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('imagem',
                 stdimage.models.StdImageField(
                     blank=True,
                     upload_to=accounts.models.get_file_path,
                     verbose_name='Imagem')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Perfil',
                'verbose_name_plural': 'Perfis',
            },
        ),
        migrations.CreateModel(
            name='Dependente',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_at',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='Criado em')),
                ('updated_at',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='Atualizado em')),
                ('status', models.BooleanField(default=True)),
                ('dependente_nome',
                 models.CharField(max_length=50,
                                  verbose_name='Nome Completo')),
                ('dependente_nascimento',
                 models.DateField(max_length=10,
                                  verbose_name='Data de Nascimento')),
                ('dependente_serie',
                 models.CharField(max_length=10, verbose_name='Ciclo/Série')),
                ('dependente_escola',
                 models.CharField(max_length=50, verbose_name='Escola')),
                ('ponto_coleta',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='pontocoleta.pontoscoleta')),
                ('responsavel',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Dependente',
                'verbose_name_plural': 'Dependentes',
            },
        ),
    ]
Ejemplo n.º 7
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Accounts',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('email',
                 models.EmailField(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_host', models.BooleanField(default=False)),
                ('account_number', models.CharField(blank=True,
                                                    max_length=20)),
                ('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='Dog',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('picture',
                 models.ImageField(
                     blank=True,
                     upload_to=accounts.models.Dog.path_and_rename,
                     verbose_name="Dog's image")),
                ('dog_name', models.CharField(max_length=50)),
                ('gender',
                 models.CharField(choices=[('male', 'Male'),
                                           ('female', 'Female')],
                                  default='Male',
                                  max_length=10)),
                ('dog_bio', models.TextField(blank=True, max_length=100)),
                ('dog_status',
                 models.CharField(choices=[('idle', 'Idle'),
                                           ('hosting', 'Hosting')],
                                  default='idle',
                                  max_length=20)),
                ('dog_create_date', models.DateField(auto_now_add=True)),
                ('dog_dob', models.DateField(default=datetime.date.today)),
                ('dog_breed', models.CharField(max_length=20)),
                ('dog_weight', models.FloatField(default=0.0)),
            ],
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('account',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     related_name='customer_account',
                     serialize=False,
                     to='accounts.accounts')),
                ('picture',
                 models.ImageField(
                     blank=True,
                     upload_to=accounts.models.Customer.path_and_rename,
                     verbose_name="Customer's image")),
                ('first_name', models.CharField(default='', max_length=30)),
                ('last_name', models.CharField(default='', max_length=30)),
                ('gender',
                 models.CharField(choices=[('male', 'Male'),
                                           ('female', 'Female'),
                                           ('none', 'None')],
                                  default='Male',
                                  max_length=10)),
                ('customer_bio', models.TextField(blank=True, max_length=100)),
                ('customer_dog_count', models.IntegerField(default=0)),
                ('customer_hosted_count', models.IntegerField(default=0)),
                ('address', models.CharField(blank=True, max_length=255)),
                ('mobile', models.CharField(blank=True, max_length=10)),
                ('dob', models.DateField(default=datetime.date.today)),
                ('latitude',
                 models.DecimalField(blank=True,
                                     decimal_places=20,
                                     max_digits=32,
                                     null=True)),
                ('longitude',
                 models.DecimalField(blank=True,
                                     decimal_places=20,
                                     max_digits=32,
                                     null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Host',
            fields=[
                ('account',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     related_name='host_account',
                     serialize=False,
                     to='accounts.accounts')),
                ('picture',
                 models.ImageField(
                     blank=True,
                     upload_to=accounts.models.Host.path_and_rename,
                     verbose_name="Host's image")),
                ('first_name', models.CharField(default='', max_length=30)),
                ('last_name', models.CharField(default='', max_length=30)),
                ('gender',
                 models.CharField(choices=[('male', 'Male'),
                                           ('female', 'Female'),
                                           ('none', 'None')],
                                  default='Male',
                                  max_length=10)),
                ('host_bio', models.TextField(blank=True, max_length=100)),
                ('host_rating', models.FloatField(default=0.0)),
                ('host_hosted_count', models.IntegerField(default=0)),
                ('host_area', models.FloatField(default=0.0)),
                ('address', models.CharField(blank=True, max_length=255)),
                ('mobile', models.CharField(blank=True, max_length=10)),
                ('dob', models.DateField(default=datetime.date.today)),
                ('latitude',
                 models.DecimalField(blank=True,
                                     decimal_places=20,
                                     max_digits=32,
                                     null=True)),
                ('longitude',
                 models.DecimalField(blank=True,
                                     decimal_places=20,
                                     max_digits=32,
                                     null=True)),
            ],
        ),
        migrations.CreateModel(
            name='DogFeedingTime',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('time', models.TimeField()),
                ('dog',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='dog_feeding_time',
                                   to='accounts.dog')),
            ],
        ),
        migrations.CreateModel(
            name='HouseImages',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('picture',
                 models.ImageField(
                     blank=True,
                     upload_to=accounts.models.HouseImages.path_and_rename,
                     verbose_name='House picture')),
                ('host',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='house_image',
                                   to='accounts.host')),
            ],
        ),
        migrations.CreateModel(
            name='HostAvailableDate',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('date', models.DateField()),
                ('host',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='host_available_date',
                                   to='accounts.host')),
            ],
        ),
        migrations.AddField(
            model_name='dog',
            name='customer',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='dog_customer',
                to='accounts.customer'),
        ),
    ]
Ejemplo n.º 8
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')),
                ('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(
                     blank=True,
                     help_text='半角アルファベット、半角数字、@/./+/-/_ で150文字以下にしてください。',
                     max_length=150,
                     null=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('email',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='email address')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'db_table': 'custom_user',
            },
            managers=[
                ('objects', accounts.models.CustomUserManager()),
            ],
        ),
    ]
Ejemplo n.º 9
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('imgpost', '0009_auto_20170113_1505'),
    ]

    operations = [
        migrations.CreateModel(
            name='EmailVerification',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('updated_on', models.DateTimeField(auto_now=True)),
                ('published_on', models.DateTimeField(blank=True, null=True)),
                ('email',
                 models.EmailField(default='*****@*****.**',
                                   max_length=254,
                                   unique=True)),
                ('slug', models.SlugField(null=True)),
                ('confirmed', models.BooleanField(default=False)),
                ('action', models.URLField()),
                ('actiontype', models.CharField(default='USER',
                                                max_length=10)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='FavouriteItems',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('posts', models.ManyToManyField(to='imgpost.ImgPost')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Following',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
                ('users',
                 models.ManyToManyField(related_name='followed_by',
                                        to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('updated_on', models.DateTimeField(auto_now=True)),
                ('published_on', models.DateTimeField(blank=True, null=True)),
                ('headshot',
                 models.ImageField(
                     upload_to=accounts.models.user_directory_path)),
                ('verified', models.BooleanField(default=False)),
                ('lastpasswordreset', models.DateTimeField(null=True)),
                ('name', models.CharField(max_length=160)),
                ('bio', models.TextField()),
                ('head_shot', models.ImageField(upload_to='user_profile')),
                ('profile_bg', models.ImageField(upload_to='user_profile')),
                ('website', models.URLField()),
                ('views', models.PositiveIntegerField(default=0)),
                ('referral',
                 models.ForeignKey(editable=False,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='parent',
                                   to=settings.AUTH_USER_MODEL)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
Ejemplo n.º 10
0
class Migration(migrations.Migration):

    initial = True

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

    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(max_length=30,
                                  unique=True,
                                  verbose_name='ユーザー名')),
                ('mailaddress',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   unique=True,
                                   verbose_name='メールアドレス')),
                ('is_staff',
                 models.BooleanField(default=True, 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_plural': 'ユーザー',
                'verbose_name': 'ユーザー',
            },
            managers=[
                ('objects', accounts.models.UserManager()),
            ],
        ),
    ]
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=255,
                                   unique=True,
                                   verbose_name='email address')),
                ('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_client', models.BooleanField(default=False)),
                ('is_partner', models.BooleanField(default=False)),
                ('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_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')),
                ('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,
            },
        ),
        migrations.CreateModel(
            name='Manage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Service',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Client',
            fields=[
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     serialize=False,
                     to=settings.AUTH_USER_MODEL)),
                ('phone', models.CharField(max_length=10)),
                ('company', models.CharField(max_length=200)),
                ('designation', models.CharField(max_length=100)),
                ('company_type', models.CharField(max_length=100)),
                ('mobile', models.CharField(max_length=10)),
                ('address', models.CharField(max_length=500)),
                ('state', models.CharField(max_length=150)),
                ('city', models.CharField(max_length=100)),
                ('pin', models.CharField(max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='Partner',
            fields=[
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     serialize=False,
                     to=settings.AUTH_USER_MODEL)),
                ('company', models.CharField(max_length=100)),
                ('phone', models.CharField(max_length=12)),
                ('ca_final', models.BooleanField()),
                ('cfa_level3', models.BooleanField()),
                ('ifc', models.BooleanField()),
                ('frm_acc', models.BooleanField()),
                ('work_exp', models.IntegerField()),
                ('previous_work', models.CharField(max_length=1000,
                                                   null=True)),
                ('address', models.CharField(max_length=500)),
                ('state', models.CharField(max_length=150)),
                ('city', models.CharField(max_length=100)),
                ('pin', models.CharField(max_length=10)),
                ('is_approved', models.BooleanField(default=False)),
                ('resume',
                 models.FileField(null=True,
                                  upload_to=accounts.database.partner_resume)),
                ('services_provided',
                 models.ManyToManyField(to='accounts.Service')),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('documents',
                 models.FileField(
                     max_length=200,
                     upload_to=accounts.database.product,
                     validators=[accounts.models.validate_file_extension])),
                ('comments',
                 models.CharField(blank=True, max_length=200, null=True)),
                ('managed',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='accounts.Manage')),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('city', models.CharField(max_length=200)),
                ('documents',
                 models.FileField(
                     max_length=200,
                     upload_to=accounts.database.order,
                     validators=[accounts.models.validate_file_extension])),
                ('comments',
                 models.CharField(blank=True, max_length=200, null=True)),
                ('ordered_date',
                 models.DateTimeField(auto_now_add=True, null=True)),
                ('service_req',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='accounts.Service')),
                ('client',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='accounts.Client')),
            ],
        ),
        migrations.AddField(
            model_name='manage',
            name='order',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='accounts.Order'),
        ),
        migrations.CreateModel(
            name='Partnerprofile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('Official_photo',
                 models.ImageField(upload_to=accounts.database.partner_photo)),
                ('Aadhar_card',
                 models.FileField(
                     max_length=200,
                     upload_to=accounts.database.partner_aadhar,
                     validators=[accounts.models.validate_file_extension])),
                ('Pan_card',
                 models.FileField(
                     max_length=200,
                     upload_to=accounts.database.partner_pan,
                     validators=[accounts.models.validate_file_extension])),
                ('Work_experience',
                 models.FileField(
                     max_length=200,
                     upload_to=accounts.database.partner_worexp,
                     validators=[accounts.models.validate_file_extension])),
                ('Payment_slip',
                 models.FileField(
                     max_length=200,
                     upload_to=accounts.database.partner_ps,
                     validators=[accounts.models.validate_file_extension])),
                ('Educational_certificate',
                 models.FileField(
                     max_length=200,
                     upload_to=accounts.database.partner_ec,
                     validators=[accounts.models.validate_file_extension])),
                ('partner',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='accounts.Partner')),
            ],
        ),
        migrations.AddField(
            model_name='manage',
            name='partner',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='accounts.Partner'),
        ),
        migrations.CreateModel(
            name='Clientprofile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('logo',
                 models.ImageField(max_length=200,
                                   upload_to=accounts.database.client_logo)),
                ('Official_photo',
                 models.ImageField(max_length=200,
                                   upload_to=accounts.database.client_photo)),
                ('Aadhar_card',
                 models.FileField(
                     max_length=200,
                     upload_to=accounts.database.client_aadhar,
                     validators=[accounts.models.validate_file_extension])),
                ('Pan_card',
                 models.FileField(
                     max_length=200,
                     upload_to=accounts.database.client_pan,
                     validators=[accounts.models.validate_file_extension])),
                ('Certificate_of_Inc',
                 models.FileField(
                     max_length=200,
                     upload_to=accounts.database.client_coinc,
                     validators=[accounts.models.validate_file_extension])),
                ('Company_Pan_card',
                 models.FileField(
                     max_length=200,
                     upload_to=accounts.database.client_cpan,
                     validators=[accounts.models.validate_file_extension])),
                ('Payment_slip',
                 models.FileField(
                     max_length=200,
                     upload_to=accounts.database.client_ps,
                     validators=[accounts.models.validate_file_extension])),
                ('TAN_Document',
                 models.FileField(
                     max_length=200,
                     upload_to=accounts.database.client_tan,
                     validators=[accounts.models.validate_file_extension])),
                ('client',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='accounts.Client')),
            ],
        ),
    ]
Ejemplo n.º 12
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('email',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='email address')),
                ('display_name', models.CharField(max_length=150)),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user cal log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether this user should be treated as active.Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_modified',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='date modified')),
                ('date_joined',
                 models.DateTimeField(auto_now_add=True,
                                      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', accounts.models.CustomUserManager()),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='ExtendedUser',
            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=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')),
                ('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 or Email')),
                ('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_plural': 'users',
                'verbose_name': 'user',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Friendship',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('from_friend',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='from_friends',
                                   to=settings.AUTH_USER_MODEL)),
                ('to_friend',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='to_friends',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nickname', models.CharField(blank=True, max_length=20)),
                ('phone_number',
                 accounts.models.PhoneNumberField(
                     blank=True,
                     help_text="'-' 없이 번호를 입력해주세요.",
                     max_length=12,
                     validators=[
                         accounts.models.phonenumber_validator,
                         accounts.models.phonenumber_validator,
                         accounts.models.phonenumber_validator,
                         accounts.models.phonenumber_validator,
                         accounts.models.phonenumber_validator
                     ])),
                ('device_type',
                 models.CharField(choices=[('a', 'ANDROID'), ('i', 'IOS')],
                                  default='a',
                                  max_length=10)),
                ('join_path', models.CharField(default='general',
                                               max_length=20)),
                ('attend_count', models.IntegerField(blank=True, default=0)),
                ('penalty_count', models.IntegerField(blank=True, default=0)),
                ('user_image',
                 models.ImageField(blank=True, upload_to='%Y/%m/%d')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='friendship',
            unique_together=set([('from_friend', 'to_friend')]),
        ),
    ]
Ejemplo n.º 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')),
                ('email',
                 models.EmailField(
                     help_text='snu.ac.kr 계정 메일을 입력해주세요',
                     max_length=254,
                     unique=True,
                     validators=[accounts.validators.snumail_validator],
                     verbose_name='이메일')),
                ('name', models.CharField(max_length=30, verbose_name='이름')),
                ('phone',
                 models.CharField(
                     help_text='01x-xxxx-xxxx 형식으로 적어주세요',
                     max_length=20,
                     validators=[accounts.validators.phone_validator],
                     verbose_name='휴대폰번호')),
                ('student_no',
                 models.CharField(
                     help_text='20xx-xxxxx 형식으로 적어주세요',
                     max_length=12,
                     unique=True,
                     validators=[accounts.validators.student_no_validator],
                     verbose_name='학번')),
                ('college',
                 models.CharField(choices=[('hum', '인문대학'), ('soc', '사회과학대학'),
                                           ('nat', '자연과학대학'), ('nur', '간호대학'),
                                           ('mba', '경영대학'), ('eng', '공과대학'),
                                           ('agr', '농업생명과학대학'),
                                           ('art', '미술대학'), ('law', '법과대학'),
                                           ('edu', '사범대학'), ('che', '생활과학대학'),
                                           ('vet', '수의과대학'), ('pha', '약학대학'),
                                           ('mus', '음악대학'), ('med', '의과대학'),
                                           ('cls', '자유전공학부'), ('uni', '연합전공'),
                                           ('cor', '연계전공')],
                                  max_length=3,
                                  verbose_name='단과대학')),
                ('department',
                 models.CharField(choices=[
                     ('aa', '국어국문학과'), ('bb', '중어중문학과'), ('cc', '영어영문학과'),
                     ('dd', '독어독문학과'), ('ee', '노어노문학과'), ('ff', '서어서문학과'),
                     ('gg', '아시아언어문명학부'), ('hh', '불어불문학과'), ('ii', '언어학과'),
                     ('jj', '국사학과'), ('kk', '동양사학과'), ('ll', '서양사학과'),
                     ('mm', '철학과'), ('nn', '종교학과'), ('oo', '미학과'),
                     ('pp', '고고미술사학과'), ('qq', '정치외교학부'), ('rr', '경제학부'),
                     ('ss', '사회학과'), ('tt', '인류학과'), ('uu', '심리학과'),
                     ('vv', '지리학과'), ('ww', '사회복지학과'), ('xx', '언론정보학과'),
                     ('yy', '수리과학부'), ('zz', '통계학과'), ('ab', '물리천문학부'),
                     ('ac', '화학부'), ('ad', '생명과학부'), ('ae', '지구환경과학부'),
                     ('af', '간호학과'), ('ag', '경영학과'), ('ah', '건설환경공학부'),
                     ('ai', '기계항공공학부'), ('aj', '재료공학부'), ('ak', '전기정보공학부'),
                     ('al', '컴퓨터공학부'), ('am', '산업공학과'), ('an', '화학생물공학부'),
                     ('ao', '건축학과'), ('ap', '건축공학과'), ('aq', '조선해양공학과'),
                     ('ar', '에너지자원공학과'), ('as', '원자력공학과'), ('at', '식물생산과학부'),
                     ('au', '산림과학부'), ('av', '응용생물화학부'), ('aw', '식품동물생명공학부'),
                     ('ax', '바비오시스템소재학부'), ('ay', '조경지역시스템공학부'),
                     ('az', '농경제사회학부'), ('bc', '동양화과'), ('bd', '서양화과'),
                     ('be', '조소과'), ('bf', '공예과'), ('bg', '디자인과'),
                     ('lw', '법학부'), ('11', '교육학과'), ('22', '국어교육과'),
                     ('33', '영어교육과'), ('44', '불어교육과'), ('55', '독어교육과'),
                     ('66', '사회교육과'), ('77', '역사교육과'), ('88', '지리교육과'),
                     ('99', '윤리교육과'), ('00', '수학교육과'), ('1a', '물리교육과'),
                     ('1b', '화학교육과'), ('1c', '생물교육과'), ('1d', '지구과학교육과'),
                     ('1e', '체육교육과'), ('1f', '소비자아동학부'), ('1g', '식품영양학과'),
                     ('1h', '의류학과'), ('1i', '수의예과'), ('1j', '수의학과'),
                     ('1k', '약학과'), ('1l', '제약학과'), ('1m', '성악과'),
                     ('1n', '작곡과(이론)'), ('1o', '작곡과(작곡)'), ('1p', '기악과'),
                     ('1q', '국악과'), ('1r', '의예과'), ('1s', '의학과'),
                     ('1t', '자유전공학부'), ('2a', '계산과학'), ('2b', '글로벌환경경영학'),
                     ('2c', '기술경영'), ('2d', '영상매체예술'), ('2e', '정보문화학'),
                     ('2f', '벤처경영학'), ('2g', '동아시아비교인문학'), ('3a', '중국학'),
                     ('3b', '미국학'), ('3c', '러시아학'), ('3d', '라틴아메리카학'),
                     ('3e', '유럽지역학'), ('3f', '뇌마음행동'), ('3g', '금융경제'),
                     ('3h', '금융수학'), ('3i', '과학기술학'), ('3j', '공학바이오'),
                     ('3k', '통합창의디자인'), ('3l', '고전문헌학'), ('3m', '인문데이터과학'),
                     ('3n', '정치경제철학')
                 ],
                                  max_length=2,
                                  verbose_name='학과')),
                ('student_category',
                 models.CharField(choices=[('u', '학부'), ('g', '대학원'),
                                           ('i', '교환학생')],
                                  max_length=1,
                                  verbose_name='분류')),
                ('enroll_year',
                 models.IntegerField(
                     default=2018,
                     validators=[accounts.validators.enroll_year_validator],
                     verbose_name='가입년도')),
                ('enroll_semester',
                 models.PositiveIntegerField(choices=[(1, '1학기'), (2, '2학기')],
                                             default=1,
                                             verbose_name='가입학기')),
                ('profile_pic',
                 imagekit.models.fields.ProcessedImageField(
                     blank=True, upload_to=accounts.models.get_profile_path)),
                ('rule_confirm',
                 models.BooleanField(default=False, verbose_name='약관동의')),
                ('date_joined',
                 models.DateTimeField(auto_now_add=True, verbose_name='가입일')),
                ('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='활동상태')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     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': '회원',
                'verbose_name_plural': '회원',
            },
            managers=[
                ('objects', accounts.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='ActiveUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('active_year',
                 models.PositiveIntegerField(default=2018,
                                             verbose_name='활동년도')),
                ('active_semester',
                 models.PositiveIntegerField(choices=[(1, '1학기'), (2, '2학기')],
                                             verbose_name='활동학기')),
                ('is_new',
                 models.BooleanField(default=False, verbose_name='신입회원여부')),
                ('is_paid',
                 models.BooleanField(default=False, 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='activeuser',
            unique_together={('user', 'active_year', 'active_semester')},
        ),
    ]
Ejemplo n.º 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')),
                ('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')),
                ('first_name',
                 models.CharField(
                     help_text=
                     'Required. 30 characters or fewer. Letters only.',
                     max_length=30,
                     validators=[
                         django.core.validators.RegexValidator(
                             '^[a-zA-Z]+$',
                             'Enter a valid name. This value may contain only letters.'
                         )
                     ],
                     verbose_name='first name')),
                ('last_name',
                 models.CharField(
                     help_text=
                     'Required. 150 characters or fewer. Letters only.',
                     max_length=150,
                     validators=[
                         django.core.validators.RegexValidator(
                             '^[a-zA-Z]+$',
                             'Enter a valid name. This value may contain only letters.'
                         )
                     ],
                     verbose_name='last name')),
                ('email',
                 models.EmailField(
                     error_messages={
                         'unique': 'A user with that email already exists.'
                     },
                     help_text='Required. Standard email format.',
                     max_length=254,
                     unique=True,
                     validators=[django.core.validators.EmailValidator()],
                     verbose_name='email address')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', accounts.models.UserManager()),
            ],
        ),
    ]
Ejemplo n.º 16
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(help_text='EMAIL ID.',
                                   max_length=64,
                                   unique=True,
                                   verbose_name='email id')),
                ('type',
                 models.CharField(choices=[('i', 'individual'),
                                           ('b', 'business'), ('a', 'ADMIN')],
                                  max_length=1,
                                  verbose_name='user type')),
                ('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=False,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('active_level', models.IntegerField(default=0)),
                ('gender',
                 models.CharField(choices=[('w', 'woman'), ('m', 'man'),
                                           ('n', 'null')],
                                  max_length=1,
                                  verbose_name='gender type')),
                ('nickname', models.CharField(max_length=35, null=True)),
                ('emoji', models.CharField(max_length=3, null=True)),
                ('created_at',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='date joined')),
                ('updated_at',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='date_updated')),
                ('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', accounts.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Nickname',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('part',
                 models.CharField(choices=[('a', '형용사'), ('n', '명사')],
                                  default='a',
                                  max_length=1,
                                  verbose_name='품사')),
                ('content', models.CharField(max_length=10, null=True)),
                ('emoji', models.CharField(max_length=3, null=True)),
            ],
            options={
                'ordering': ['part'],
            },
        ),
        migrations.CreateModel(
            name='NicknameArchive',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nickname', models.CharField(max_length=30)),
                ('count', models.IntegerField(default=1)),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('tag_text', models.CharField(max_length=10)),
                ('tag_code', models.AutoField(primary_key=True,
                                              serialize=False)),
            ],
            options={
                'ordering': ['tag_code'],
            },
        ),
        migrations.CreateModel(
            name='UserTag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('tag',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='accounts.tag')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
    ]
Ejemplo n.º 17
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')),
                ('email',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='email')),
                ('nickname', models.CharField(max_length=20, unique=True)),
                ('survey', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('is_admin', models.BooleanField(default=False)),
                ('is_superuser', models.BooleanField(default=False)),
                ('is_staff', 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', accounts.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50, null=True)),
                ('lastname', models.CharField(max_length=50, null=True)),
                ('birth', models.DateField(blank=True, null=True)),
                ('profile_image', models.URLField(null=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Ejemplo n.º 18
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Account',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('email', models.EmailField(max_length=255, unique=True)),
                ('first_name', models.CharField(blank=True, max_length=255)),
                ('last_name', models.CharField(blank=True, max_length=255)),
                ('is_staff', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('permission_irf_view', models.BooleanField(default=False)),
                ('permission_irf_add', models.BooleanField(default=False)),
                ('permission_irf_edit', models.BooleanField(default=False)),
                ('permission_irf_delete', models.BooleanField(default=False)),
                ('permission_vif_view', models.BooleanField(default=False)),
                ('permission_vif_add', models.BooleanField(default=False)),
                ('permission_vif_edit', models.BooleanField(default=False)),
                ('permission_vif_delete', models.BooleanField(default=False)),
                ('permission_person_match',
                 models.BooleanField(default=False)),
                ('permission_accounts_manage',
                 models.BooleanField(default=False)),
                ('permission_receive_investigation_alert',
                 models.BooleanField(default=False)),
                ('permission_receive_legal_alert',
                 models.BooleanField(default=False)),
                ('permission_border_stations_view',
                 models.BooleanField(default=False)),
                ('permission_border_stations_add',
                 models.BooleanField(default=False)),
                ('permission_border_stations_edit',
                 models.BooleanField(default=False)),
                ('permission_border_stations_delete',
                 models.BooleanField(default=False)),
                ('permission_address2_manage',
                 models.BooleanField(default=False)),
                ('permission_budget_view', models.BooleanField(default=False)),
                ('permission_budget_add', models.BooleanField(default=False)),
                ('permission_budget_edit', models.BooleanField(default=False)),
                ('permission_budget_delete',
                 models.BooleanField(default=False)),
                ('permission_can_receive_mdf',
                 models.BooleanField(default=False)),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('activation_key',
                 models.CharField(default=accounts.models.make_activation_key,
                                  max_length=40)),
                ('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')),
            ],
            options={
                'verbose_name': 'account',
                'verbose_name_plural': 'accounts',
            },
        ),
        migrations.CreateModel(
            name='Alert',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('code', models.CharField(max_length=255, unique=True)),
                ('email_template', models.CharField(max_length=255)),
            ],
            options={
                'verbose_name': 'alert',
                'verbose_name_plural': 'alerts',
            },
        ),
        migrations.CreateModel(
            name='DefaultPermissionsSet',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=255, unique=True)),
                ('permission_irf_view', models.BooleanField(default=False)),
                ('permission_irf_add', models.BooleanField(default=False)),
                ('permission_irf_edit', models.BooleanField(default=False)),
                ('permission_irf_delete', models.BooleanField(default=False)),
                ('permission_vif_view', models.BooleanField(default=False)),
                ('permission_vif_add', models.BooleanField(default=False)),
                ('permission_vif_edit', models.BooleanField(default=False)),
                ('permission_vif_delete', models.BooleanField(default=False)),
                ('permission_person_match',
                 models.BooleanField(default=False)),
                ('permission_accounts_manage',
                 models.BooleanField(default=False)),
                ('permission_receive_investigation_alert',
                 models.BooleanField(default=False)),
                ('permission_receive_legal_alert',
                 models.BooleanField(default=False)),
                ('permission_border_stations_view',
                 models.BooleanField(default=False)),
                ('permission_border_stations_add',
                 models.BooleanField(default=False)),
                ('permission_border_stations_edit',
                 models.BooleanField(default=False)),
                ('permission_border_stations_delete',
                 models.BooleanField(default=False)),
                ('permission_address2_manage',
                 models.BooleanField(default=False)),
                ('permission_budget_view', models.BooleanField(default=False)),
                ('permission_budget_add', models.BooleanField(default=False)),
                ('permission_budget_edit', models.BooleanField(default=False)),
                ('permission_budget_delete',
                 models.BooleanField(default=False)),
                ('permission_can_receive_mdf',
                 models.BooleanField(default=False)),
            ],
        ),
        migrations.AddField(
            model_name='alert',
            name='permissions_group',
            field=models.ManyToManyField(to='accounts.DefaultPermissionsSet'),
        ),
        migrations.AddField(
            model_name='account',
            name='user_designation',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='accounts',
                to='accounts.DefaultPermissionsSet'),
        ),
        migrations.AddField(
            model_name='account',
            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'),
        ),
    ]
Ejemplo n.º 19
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')),
                ('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=30,
                                  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')),
                ('profile_picture',
                 models.CharField(default='img/non-user.png', max_length=20)),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', accounts.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='UserRole',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('label_name', models.CharField(max_length=20)),
            ],
        ),
    ]
Ejemplo n.º 20
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='UserInfo',
            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(db_index=True,
                                  error_messages={'unique': '该用户名已经存在'},
                                  max_length=40,
                                  unique=True,
                                  verbose_name='用户名')),
                ('image',
                 models.ImageField(default='img/default_user.jpg',
                                   upload_to=accounts.models.reset_user_image,
                                   verbose_name='图像')),
                ('email',
                 models.EmailField(error_messages={'unique': '该邮箱已经存在'},
                                   max_length=255,
                                   unique=True,
                                   verbose_name='邮箱')),
                ('is_active',
                 models.BooleanField(default=False, verbose_name='状态')),
                ('is_superuser',
                 models.BooleanField(default=False, verbose_name='管理员')),
                ('nickname',
                 models.CharField(blank=True,
                                  max_length=64,
                                  null=True,
                                  verbose_name='昵称')),
            ],
            options={
                'verbose_name': '用户管理',
                'verbose_name_plural': '用户管理',
            },
        ),
        migrations.CreateModel(
            name='PermissionList',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=64, verbose_name='权限名称')),
                ('url', models.CharField(max_length=255, verbose_name='URL')),
            ],
            options={
                'verbose_name': '权限管理',
                'verbose_name_plural': '权限管理',
            },
        ),
        migrations.CreateModel(
            name='RoleList',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=64,
                                  unique=True,
                                  verbose_name='角色名称')),
                ('permissions',
                 models.ManyToManyField(blank=True,
                                        to='accounts.PermissionList',
                                        verbose_name='权限')),
            ],
            options={
                'verbose_name': '角色管理',
                'verbose_name_plural': '角色管理',
            },
        ),
        migrations.AlterUniqueTogether(
            name='permissionlist',
            unique_together=set([('name', 'url')]),
        ),
        migrations.AddField(
            model_name='userinfo',
            name='role',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='accounts.RoleList',
                verbose_name='角色'),
        ),
    ]
Ejemplo n.º 21
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=255, null=True)),
                ('last_name',
                 models.CharField(blank=True, max_length=255, null=True)),
                ('date_of_birth', models.DateField(blank=True, null=True)),
                ('address_1', models.TextField(blank=True, null=True)),
                ('address_2', models.TextField(blank=True, null=True)),
                ('post_code',
                 models.CharField(blank=True, max_length=255, null=True)),
                ('telephone',
                 models.CharField(blank=True, max_length=20, null=True)),
                ('email', models.EmailField(max_length=255, unique=True)),
                ('picture',
                 models.ImageField(blank=True,
                                   max_length=5000,
                                   null=True,
                                   upload_to=accounts.models.file_upload_to)),
                ('is_verified', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('is_admin', models.BooleanField(default=False)),
                ('created_at',
                 models.DateTimeField(auto_now_add=True, null=True)),
                ('updated_at', models.DateTimeField(auto_now=True, null=True)),
            ],
            options={
                'verbose_name': 'User',
                'verbose_name_plural': 'Users',
            },
        ),
        migrations.CreateModel(
            name='MobileVerificationCode',
            fields=[
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     related_name='mobile_verification_code',
                     serialize=False,
                     to=settings.AUTH_USER_MODEL)),
                ('code', models.TextField(max_length=20)),
                ('created_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        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'),
        ),
    ]
Ejemplo n.º 22
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='CustomUsuario',
            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')),
                ('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='E-mail')),
                ('matricula',
                 models.CharField(max_length=60,
                                  unique=True,
                                  verbose_name='Matricula')),
                ('is_staff',
                 models.BooleanField(default=True,
                                     verbose_name='Membro da equipe')),
                ('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': 'usuario',
                'managed': True,
            },
            managers=[
                ('objects', accounts.models.UsuarioManager()),
            ],
        ),
    ]
Ejemplo n.º 23
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
        ('entm', '0001_initial'),
    ]

    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')),
                ('user_name',
                 models.CharField(max_length=30,
                                  unique=True,
                                  verbose_name='用户名')),
                ('real_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='真实姓名')),
                ('sex',
                 models.CharField(blank=True, max_length=30,
                                  verbose_name='性别')),
                ('phone_number',
                 models.CharField(blank=True, max_length=30,
                                  verbose_name='手机')),
                ('expire_date',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='授权截止日期')),
                ('idstr',
                 models.CharField(blank=True, max_length=300, null=True)),
                ('uuid', models.CharField(blank=True,
                                          max_length=300,
                                          null=True)),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=255,
                                   verbose_name='邮箱')),
                ('is_active',
                 models.BooleanField(default=True, verbose_name='启停状态')),
                ('staff', models.BooleanField(default=False)),
                ('admin', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MyRoles',
            fields=[
                ('group_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='auth.Group')),
                ('notes', models.CharField(blank=True, max_length=156)),
                ('rid', models.CharField(blank=True, max_length=1000)),
                ('uid', models.CharField(blank=True, max_length=100)),
                ('permissionTree', models.TextField(blank=True)),
                ('belongto',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='roles',
                                   to='entm.Organizations')),
            ],
            bases=('auth.group', ),
            managers=[
                ('objects', accounts.models.MyRolesManager()),
            ],
        ),
        migrations.AddField(
            model_name='user',
            name='Role',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='users',
                to='accounts.MyRoles',
                verbose_name='角色'),
        ),
        migrations.AddField(
            model_name='user',
            name='belongto',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='users',
                to='entm.Organizations',
                verbose_name='所属组织'),
        ),
        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'),
        ),
    ]
Ejemplo n.º 24
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')),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('first_name',
                 models.CharField(max_length=60, verbose_name='Fornavn')),
                ('last_name',
                 models.CharField(max_length=150, verbose_name='Etternavn')),
                ('spotify_username',
                 models.CharField(blank=True, max_length=150, null=True)),
                ('phone_number',
                 models.CharField(blank=True,
                                  max_length=13,
                                  verbose_name='Mobilnummer')),
                ('is_active', models.BooleanField(default=True)),
                ('is_staff', models.BooleanField(default=False)),
                ('is_superuser', models.BooleanField(default=False)),
                ('date_joined',
                 models.DateTimeField(blank=True,
                                      default=django.utils.timezone.now,
                                      editable=False,
                                      verbose_name='Opprettet')),
                ('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': ['email'],
            },
            managers=[
                ('objects', accounts.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Theme',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=140,
                                  null=True,
                                  verbose_name='Navn')),
                ('background_color',
                 models.CharField(blank=True,
                                  help_text='CSS eg: blue, rgba(0,0,255, 0.5)',
                                  max_length=1000,
                                  null=True,
                                  verbose_name='Bakgrunnsfarge')),
                ('text_color',
                 models.CharField(help_text='CSS eg: blue, rgba(0,0,255, 0.5)',
                                  max_length=140,
                                  null=True,
                                  verbose_name='Tekstfarge')),
                ('link_color',
                 models.CharField(help_text='CSS eg: blue, rgba(0,0,255, 0.5)',
                                  max_length=140,
                                  null=True,
                                  verbose_name='Linkfarge')),
                ('link_hover_color',
                 models.CharField(help_text='CSS eg: blue, rgba(0,0,255, 0.5)',
                                  max_length=140,
                                  null=True,
                                  verbose_name='Link hover farge')),
                ('created',
                 models.DateTimeField(blank=True,
                                      editable=False,
                                      null=True,
                                      verbose_name='Opprettet')),
                ('user',
                 models.OneToOneField(
                     blank=True,
                     help_text='Dersom eier er satt, vil temaet være privat',
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='themes',
                     to=settings.AUTH_USER_MODEL,
                     verbose_name='Eier')),
            ],
            options={
                'verbose_name': 'Tema',
                'verbose_name_plural': 'Temaer',
                'ordering': ['user', 'name'],
            },
        ),
        migrations.CreateModel(
            name='SpotifyToken',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('info', models.TextField(blank=True, null=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='spotify_token',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Settings',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('background',
                 models.CharField(blank=True,
                                  default=None,
                                  help_text='Bildeaddresse',
                                  max_length=1000,
                                  null=True,
                                  verbose_name='Bakgrunn URL')),
                ('scrollbar',
                 models.CharField(blank=True,
                                  default=None,
                                  max_length=1000,
                                  null=True,
                                  verbose_name='Scrollbar farge')),
                ('account_theme',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='settings_as_account',
                     to='accounts.Theme',
                     verbose_name='Bruker-tema')),
                ('course_theme',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='settings_as_course',
                     to='accounts.Theme',
                     verbose_name='Kurs-tema')),
                ('event_theme',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='settings_as_event',
                     to='accounts.Theme',
                     verbose_name='Event-tema')),
                ('footer_theme',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='settings_as_footer',
                     to='accounts.Theme',
                     verbose_name='Footer-tema')),
                ('input_theme',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='settings_as_input',
                     to='accounts.Theme',
                     verbose_name='Input-tema')),
                ('main_theme',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='settings_as_main',
                     to='accounts.Theme',
                     verbose_name='Hoved-tema')),
                ('song_theme',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='settings_as_song',
                     to='accounts.Theme',
                     verbose_name='Musikk-tema')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='settings',
                     to=settings.AUTH_USER_MODEL,
                     verbose_name='Tilhører')),
                ('video_theme',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='settings_as_video',
                     to='accounts.Theme',
                     verbose_name='Turbibliotek-tema')),
                ('wiki_theme',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='settings_as_wiki',
                     to='accounts.Theme',
                     verbose_name='Wiki-tema')),
            ],
            options={
                'verbose_name': 'Instilling',
                'verbose_name_plural': 'Instillinger',
            },
        ),
        migrations.CreateModel(
            name='Instructor',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('type',
                 models.IntegerField(choices=[(0, '------'), (1, 'lead'),
                                              (2, 'follow'),
                                              (3, 'hjelpeinstruktør'),
                                              (4, 'annet')],
                                     default=0)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='instructor_set',
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Instruktør',
                'verbose_name_plural': 'Instruktører',
                'ordering': ['type'],
            },
        ),
    ]
Ejemplo n.º 25
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Profile',
            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)),
                ('first_name', models.CharField(default='Test',
                                                max_length=255)),
                ('last_name', models.CharField(default='Test',
                                               max_length=255)),
                ('image', models.FileField(upload_to='upload/')),
                ('birthday', models.DateTimeField(blank=True, null=True)),
                ('is_active', models.BooleanField(default=True)),
                ('is_staff', models.BooleanField(default=False)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
            },
            managers=[
                ('objects', accounts.models.UserManager()),
            ],
        ),
    ]
Ejemplo n.º 26
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('name', models.CharField(max_length=50)),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('phone_num', models.CharField(max_length=15, unique=True)),
                ('address', models.TextField(blank=True, max_length=500)),
                ('last_known_latitude',
                 models.DecimalField(decimal_places=6,
                                     max_digits=9,
                                     null=True,
                                     verbose_name='latitude')),
                ('last_known_longitude',
                 models.DecimalField(decimal_places=6,
                                     max_digits=9,
                                     null=True,
                                     verbose_name='longitude')),
                ('is_safe', models.NullBooleanField()),
                ('is_superuser', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
            managers=[
                ('objects', accounts.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Watch',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('watchee',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='watchee',
                                   to=settings.AUTH_USER_MODEL)),
                ('watcher',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='watcher',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='user',
            name='watching',
            field=models.ManyToManyField(blank=True,
                                         related_name='watchers',
                                         through='accounts.Watch',
                                         to=settings.AUTH_USER_MODEL),
        ),
    ]
Ejemplo n.º 27
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')),
                ('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',
                'abstract': False,
            },
            managers=[
                ('objects', accounts.models._UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Fadder',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='fadder',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Ejemplo n.º 28
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='CustomUser',
            fields=[
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('uuid',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('email',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='メールアドレス')),
                ('first_name',
                 models.CharField(blank=True, max_length=30,
                                  verbose_name='名')),
                ('last_name',
                 models.CharField(blank=True, max_length=150,
                                  verbose_name='姓')),
                ('is_staff',
                 models.BooleanField(default=False,
                                     help_text='ユーザーが管理サイトにログイン可能かどうかを示します。',
                                     verbose_name='is staff')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether the user should be treated as active.\nUnselect this instead of deleting accounts.',
                     verbose_name='有効')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='登録日')),
                ('a_factor',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='a factor')),
                ('b_factor',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='b factor')),
                ('c_factor',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='c factor')),
                ('d_factor',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='d factor')),
                ('e_factor',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='e factor')),
                ('ffs_type',
                 models.CharField(blank=True,
                                  max_length=5,
                                  null=True,
                                  verbose_name='ffs type')),
                ('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': 'ユーザー',
                'verbose_name_plural': 'ユーザー',
            },
            managers=[
                ('objects', accounts.models.CustomUserManager()),
            ],
        ),
    ]
Ejemplo n.º 29
0
class Migration(migrations.Migration):

    initial = True

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

    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')),
                ('email',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='メールアドレス')),
                ('first_name', models.CharField(max_length=30,
                                                verbose_name='姓')),
                ('last_name', models.CharField(max_length=30,
                                               verbose_name='名')),
                ('department',
                 models.CharField(blank=True, max_length=30,
                                  verbose_name='所属')),
                ('created',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_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')),
                ('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', accounts.models.UserManager()),
            ],
        ),
    ]
Ejemplo n.º 30
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Users',
            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')),
                ('middle_name',
                 models.CharField(max_length=150,
                                  null=True,
                                  verbose_name='middle name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(default=False,
                                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(default=True, verbose_name='active')),
                ('type',
                 models.CharField(choices=[('front_user', 'front_user'),
                                           ('admin', 'admin')],
                                  default='front_user',
                                  max_length=10)),
                ('phone', models.CharField(default=None, max_length=15)),
                ('gender',
                 models.CharField(choices=[('male', 'male'),
                                           ('female', 'female'),
                                           ('other', 'other')],
                                  max_length=6,
                                  null=True)),
                ('date_of_birth', models.DateField(null=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('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={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
            },
            managers=[
                ('objects', accounts.models.UserManager()),
            ],
        ),
    ]