class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('titulo_post', models.CharField(max_length=150)),
                ('data_post', models.DateTimeField(default=django.utils.timezone.now)),
                ('conteudo_post', models.TextField()),
                ('resumo_post', models.TextField()),
                ('imagem_post', models.ImageField(blank=True, null=True, upload_to='post_img')),
                ('publicado_post', models.BooleanField(default=False)),
                ('autor_post', models.ForeignKey(default=accounts.models.User, on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL)),
                ('categoria_post', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='categorias.categoria')),
            ],
        ),
    ]
Example #2
0
class Migration(migrations.Migration):

    dependencies = [
        ('accounts', '0003_profile_alarm_paper'),
    ]

    operations = [
        migrations.AlterField(
            model_name='profile',
            name='alarm_list',
            field=models.TextField(blank=True, default=''),
        ),
        migrations.AlterField(
            model_name='profile',
            name='bookmarks',
            field=models.TextField(blank=True, default=''),
        ),
        migrations.AlterField(
            model_name='profile',
            name='ip_list',
            field=models.TextField(blank=True, default=''),
        ),
        migrations.AlterField(
            model_name='profile',
            name='portrait',
            field=models.ImageField(blank=True, upload_to='portrait/%Y-%m-%d/', validators=[accounts.models.img_validator]),
        ),
        migrations.AlterField(
            model_name='profile',
            name='scrap',
            field=models.TextField(blank=True, default=''),
        ),
    ]
Example #3
0
class Migration(migrations.Migration):

    dependencies = [
        ('accounts', '0019_auto_20200830_2204'),
    ]

    operations = [
        migrations.AddField(
            model_name='customuser',
            name='avatar',
            field=models.ImageField(
                blank=True,
                null=True,
                upload_to=accounts.models.image_directory_path),
        ),
        migrations.AddField(
            model_name='customuser',
            name='description',
            field=models.TextField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='customuser',
            name='website_url',
            field=models.TextField(blank=True, null=True),
        ),
        migrations.AlterField(
            model_name='customuser',
            name='first_name',
            field=models.CharField(
                blank=True,
                max_length=30,
                null=True,
                validators=[
                    django.core.validators.RegexValidator(
                        '^[a-zA-Z]*$',
                        'Only alpha characters are allowed for Username.')
                ]),
        ),
        migrations.AlterField(
            model_name='customuser',
            name='last_name',
            field=models.CharField(
                blank=True,
                max_length=30,
                null=True,
                validators=[
                    django.core.validators.RegexValidator(
                        '^[a-zA-Z]*$',
                        'Only alpha characters are allowed for Username.')
                ]),
        ),
    ]
Example #4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Farm',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=24, unique=True)),
                ('addr', models.CharField(blank=True, max_length=64)),
                ('phone', models.CharField(blank=True, max_length=16)),
                ('subject', models.CharField(blank=True, max_length=128)),
                ('price', models.PositiveIntegerField(default=0)),
                ('desc', models.TextField(blank=True, null=True)),
                ('notice',
                 models.TextField(blank=True, max_length=1024, null=True)),
                ('is_delete', models.BooleanField(default=False)),
                ('created_date', models.DateField(auto_now_add=True)),
                ('updated_date', models.DateField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='FarmImage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=accounts.models.user_directory_path)),
                ('is_delete', models.BooleanField(default=False)),
                ('created_date', models.DateField(auto_now_add=True)),
                ('updated_date', models.DateField(auto_now=True)),
                ('flags', models.IntegerField(db_index=True, default=0)),
                ('farm',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='images',
                                   to='farm.Farm')),
            ],
        ),
    ]
Example #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')),
                ('email', models.EmailField(help_text='이메일(아이디)', max_length=64, unique=True, verbose_name='email id')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('is_delete', models.DateTimeField(blank=True, default=None, help_text='계정 삭제 여부', null=True)),
                ('type', models.CharField(blank=True, choices=[('g', '일반 계정'), ('b', '비니지스 계정'), ('a', '관리자')], max_length=1, null=True, verbose_name='user type')),
                ('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='UserProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, help_text='이름', max_length=20, null=True, verbose_name='name')),
                ('gender', models.CharField(blank=True, help_text='성별', max_length=6, null=True, verbose_name='gender')),
                ('personal_presentation', models.TextField(blank=True, help_text='자기 소개', null=True, verbose_name='personal presentation')),
                ('location', models.TextField(blank=True, help_text='위치', null=True, verbose_name='location')),
                ('web_site', models.URLField(blank=True, help_text='웹사이트', null=True, verbose_name='web site')),
                ('country_code', models.TextField(blank=True, help_text='국가 코드', max_length=2, null=True, verbose_name='contry code')),
                ('is_adult', models.BooleanField(default=False, help_text='성인 여부', verbose_name='adult certification')),
                ('user', models.OneToOneField(blank=True, help_text='연결된 계정', null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='user')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('lands', '0027_auto_20170604_1317'),
    ]

    operations = [
        migrations.CreateModel(
            name='Camera',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('url', models.CharField(max_length=1024, verbose_name='页面地址(URL)信息:')),
                ('title', models.CharField(blank=True, max_length=64, null=True, verbose_name='标题')),
                ('definition', models.PositiveSmallIntegerField(blank=True, choices=[(1, '512/768kpbs'), (2, '128/256kpbs')], default=1, null=True, verbose_name='分辨率')),
                ('abstract', models.TextField(blank=True, max_length=1024, null=True, verbose_name='简介')),
                ('cover_img', models.ImageField(blank=True, null=True, upload_to=accounts.models.user_directory_path, verbose_name='封面图片')),
                ('password', models.CharField(blank=True, help_text='纯数字,最长 6 位数', max_length=6, null=True, verbose_name='播放密码')),
                ('duration', models.IntegerField(default=10, verbose_name='播放时长限制')),
                ('created_date', models.DateField(auto_now_add=True, verbose_name='创建时间')),
                ('updated_date', models.DateField(auto_now=True, verbose_name='修改时间')),
                ('is_active', models.BooleanField(default=True, verbose_name='是否被激活')),
                ('land', models.ForeignKey(default=1, help_text='摄像头所安置的土地名', on_delete=django.db.models.deletion.CASCADE, to='lands.Land', verbose_name='土地')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('accounts', '0003_auto_20180525_1803'),
    ]

    operations = [
        migrations.CreateModel(
            name='ProfileImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('alt_text', models.CharField(blank=True, max_length=255, null=True)),
                ('file', models.ImageField(upload_to=accounts.models.profile_img_uh)),
                ('description', models.TextField(blank=True, null=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AlterModelOptions(
            name='category',
            options={'verbose_name_plural': 'Categories'},
        ),
        migrations.AlterField(
            model_name='blog',
            name='title',
            field=models.CharField(max_length=200),
        ),
    ]
Example #8
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('birthdate', models.DateField(blank=True, null=True)),
                ('phone', models.CharField(blank=True,
                                           max_length=20,
                                           null=True)),
                ('address', models.TextField(blank=True, null=True)),
                ('balance', models.PositiveIntegerField(default=0)),
                ('profile_image',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=accounts.models.path_and_rename)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('exams', '0005_auto_20200825_1529'),
    ]

    operations = [
        migrations.CreateModel(
            name='Submission',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('candidate_code',
                 models.CharField(default='GER/EDO/AN/INT/00',
                                  max_length=200)),
                ('text', models.TextField(max_length=2000)),
                ('submit_date',
                 models.DateTimeField(default=datetime.datetime(
                     2020, 8, 25, 14, 44, 24, 551457, tzinfo=utc))),
                ('score', models.FloatField(default=0)),
                ('email',
                 models.ForeignKey(blank=True,
                                   default=accounts.models.CustomUser,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.DeleteModel(name='Questions', ),
    ]
Example #10
0
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('accounts', '0002_nafdacnumber_reference_number'),
    ]

    operations = [
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('company_name',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('company_address', models.TextField(blank=True, null=True)),
                ('image',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=accounts.models.upload_comany_image_path)),
                ('active', models.BooleanField(default=True)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('nafdac_number',
                 models.OneToOneField(on_delete='',
                                      related_name='Nafdac_Number',
                                      to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #11
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('given_name', models.CharField(max_length=255)),
                ('family_name', models.CharField(max_length=255)),
                ('date_of_birth', models.DateField()),
                ('bio', models.TextField()),
                ('avatar', models.ImageField(blank=True, null=True, upload_to=accounts.models.user_avatar_path)),
                ('city', models.CharField(blank=True, default='', max_length=255)),
                ('state', models.CharField(blank=True, default='', max_length=255)),
                ('country', models.CharField(blank=True, default='', max_length=255)),
                ('favourite_animal', models.CharField(blank=True, default='', max_length=255)),
                ('hobby', models.CharField(blank=True, default='', max_length=255)),
                ('favourite_fountain_pen', models.CharField(blank=True, default='', max_length=255)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #12
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('avatar',
                 models.ImageField(
                     default='user/avatar.jpg',
                     upload_to=accounts.models.user_directory_path)),
                ('bio', models.TextField(blank=True, max_length=500)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #13
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('first', models.CharField(blank=True, max_length=30)),
                ('last_name', models.CharField(blank=True, max_length=50)),
                ('birth', models.DateField(blank=True)),
                ('bio', models.TextField(default='', max_length=300)),
                ('location', models.CharField(blank=True, max_length=30)),
                ('ava',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=accounts.models.get_ava_image)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #14
0
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('photo',
                 models.ImageField(upload_to=accounts.models.upload_user)),
                ('address', models.TextField()),
                ('contact', models.CharField(max_length=250)),
                ('aadhar', models.DecimalField(decimal_places=0,
                                               max_digits=12)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #15
0
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('picture',
                 models.ImageField(default='blank/no_img.png',
                                   upload_to=accounts.models.user_id)),
                ('date_of_birth', models.DateField(blank=True, null=True)),
                ('bio', models.TextField(blank=True, max_length=500,
                                         null=True)),
                ('website',
                 models.CharField(blank=True, max_length=255, null=True)),
                ('location',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #16
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='UserModel',
            fields=[
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('sys_id', models.AutoField(primary_key=True,
                                            serialize=False)),
                ('email', models.EmailField(max_length=127, unique=True)),
                ('phone', models.TextField()),
            ],
            options={
                'db_table': 'users',
            },
            managers=[
                ('objects', accounts.models.MyUserManager()),
            ],
        ),
    ]
Example #17
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')),
                ('name', models.CharField(max_length=255)),
                ('nickname', models.CharField(max_length=255)),
                ('email', models.CharField(max_length=255, unique=True)),
                ('description', models.TextField()),
                ('is_active', models.BooleanField(default=True)),
                ('is_admin', models.BooleanField(default=False)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'abstract': False,
            },
            managers=[
                ('objects', accounts.models.UserManager()),
            ],
        ),
    ]
Example #18
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('username', models.CharField(max_length=100, unique=True)),
                ('email', models.EmailField(max_length=254)),
                ('first_name', models.CharField(blank=True, default='', max_length=50)),
                ('last_name', models.CharField(blank=True, default='', max_length=50)),
                ('photo', models.ImageField(blank=True, null=True, upload_to=accounts.models.user_directory_path)),
                ('bio', models.TextField(blank=True, default='')),
                ('is_active', models.BooleanField(default=True)),
                ('is_admin', models.BooleanField(default=False)),
                ('staff_or_intern', models.IntegerField(choices=[(0, 'Neither'), (1, 'Estudio Caribe Staff'), (2, 'Estudio Caribe Intern')], default=0, verbose_name='Is staff or intern?')),
                ('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,
            },
        ),
    ]
Example #19
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('profile', models.ImageField(default='profile.png', help_text='Profile Picture', upload_to=accounts.models.user_directory_path)),
                ('bio', models.TextField(blank=True, default='ND', max_length=500)),
                ('location', models.CharField(blank=True, default='ND', max_length=30)),
                ('organization', models.CharField(blank=True, default='ND', max_length=100)),
                ('linkedin', models.URLField(blank=True, default='https://www.linkedin.com/in/username/')),
                ('github', models.URLField(blank=True, default='https://github.com/username')),
                ('twitter', models.URLField(blank=True, default='https://twitter.com/username')),
                ('facebook', models.URLField(blank=True, default='https://facebook.com/username')),
                ('instagram', models.URLField(blank=True, default='https://www.instagram.com/user.name/')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #20
0
class Post(models.Model):
    STATUS_CHOICES = (
        ('draft', 'Draft'),
        ('published', 'Published'),
    )
    TYPE_CHOICES = (
        ('assignment', 'Assignment'),
    )
    stream = models.ForeignKey('course.CourseOffering', on_delete=models.CASCADE)
    user = models.ForeignKey('accounts.User', on_delete=models.CASCADE)
    slug = models.UUIDField(default=uuid4, editable=False, unique=True)
    body = models.TextField()
    allow_comments = models.BooleanField('allow comments', default=True)
    publish = models.DateTimeField(auto_now_add=True)
    modified = models.DateTimeField(auto_now=True)
    post_type = models.CharField(_('post type'), max_length=25, blank=True, choices=TYPE_CHOICES)
    assignment = models.ForeignKey('assignment.Assignment', null=True, blank=True, on_delete=models.CASCADE)
    objects = PublicManager()  # Our custom manager.

    class Meta:
        ordering = ('-publish',)

    def __str__(self):
        return f'{self.user.username}: {self.body[:30]}'

    def get_absolute_url(self):
        return reverse('course:stream:post-detail', kwargs={ 'slug': self.stream.slug, 'post_slug': self.slug })
Example #21
0
class Migration(migrations.Migration):

    dependencies = [
        ('accounts', '0017_auto_20180820_1312'),
    ]

    operations = [
        migrations.AlterField(
            model_name='profile',
            name='bio',
            field=models.TextField(blank=True, null=True, validators=[accounts.models.min_length]),
        ),
        migrations.AlterField(
            model_name='profile',
            name='birthdate',
            field=models.DateField(blank=True, null=True),
        ),
        migrations.AlterField(
            model_name='user',
            name='email',
            field=models.EmailField(blank=True, max_length=254),
        ),
        migrations.AlterField(
            model_name='user',
            name='first_name',
            field=models.CharField(blank=True, max_length=25),
        ),
        migrations.AlterField(
            model_name='user',
            name='last_name',
            field=models.CharField(blank=True, max_length=25),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(blank=True, max_length=50, null=True)),
                ('last_name', models.CharField(blank=True, max_length=50, null=True)),
                ('location', models.CharField(blank=True, max_length=50, null=True)),
                ('url', models.CharField(blank=True, max_length=80, null=True)),
                ('profile_info', models.TextField(blank=True, max_length=150, null=True)),
                ('created', models.DateField(auto_now_add=True)),
                ('picture', models.ImageField(blank=True, null=True, upload_to=accounts.models.user_directory_path, verbose_name='Picture')),
                ('is_eduprovider', models.BooleanField(default=False)),
                ('is_teacher', models.BooleanField(default=False)),
                ('is_parent', models.BooleanField(default=False)),
                ('is_student', models.BooleanField(default=False)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('DOB', models.DateField(blank=True, null=True)),
                ('bio',
                 models.TextField(
                     validators=[accounts.models.min_length_validator])),
                ('avatar', models.ImageField(upload_to='avatars/')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #24
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('profile_picture',
                 models.ImageField(blank=True,
                                   height_field='height_field',
                                   null=True,
                                   upload_to=accounts.models.upload_location,
                                   width_field='width_field')),
                ('height_field', models.IntegerField(default=0)),
                ('width_field', models.IntegerField(default=0)),
                ('about', models.TextField(blank=True, null=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #25
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nickname', models.CharField(blank=True, max_length=40)),
                ('introduction', models.TextField(blank=True)),
                ('image',
                 imagekit.models.fields.ProcessedImageField(
                     blank=True,
                     upload_to=accounts.models.profile_image_path)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('accounts', '0017_auto_20200815_1658'),
    ]

    operations = [
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('order_useremail',
                 models.EmailField(default=None, max_length=254)),
                ('order_name', models.CharField(max_length=1024)),
                ('order_image', models.ImageField(upload_to='orderimages/')),
                ('order_price', models.PositiveIntegerField()),
                ('order_publisher', models.CharField(max_length=1024)),
                ('order_origin', models.CharField(max_length=1024)),
                ('order_description', models.TextField()),
                ('order_quantity', models.PositiveIntegerField(default=1)),
                ('order_total_price', models.PositiveIntegerField(default=0)),
                ('order_delivery_date',
                 models.DateTimeField(
                     default=accounts.models.return_datetime)),
            ],
        ),
        migrations.RemoveField(
            model_name='addtocart',
            name='cart_slug',
        ),
    ]
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='UserProfileInfo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('about_you', models.TextField(blank=True)),
                ('url', models.URLField(blank=True)),
                ('profile_pic',
                 models.ImageField(
                     blank=True,
                     default='profile_pic/default/no_picture.png',
                     null=True,
                     upload_to=accounts.models.UserProfileInfo.picture_path)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #28
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Questions',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('text', models.TextField(max_length=2000)),
                ('created_date',
                 models.DateTimeField(default=datetime.datetime(
                     2020, 8, 25, 8, 54, 40, 242880, tzinfo=utc))),
                ('start_date', models.DateTimeField(blank=True, null=True)),
                ('submit_date', models.DateTimeField(blank=True, null=True)),
                ('published_date', models.DateTimeField(blank=True,
                                                        null=True)),
                ('author',
                 models.ForeignKey(blank=True,
                                   default=accounts.models.CustomUser,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Example #29
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Account',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('email', models.EmailField(max_length=60, unique=True, verbose_name='Email')),
                ('username', models.CharField(max_length=60, unique=True, verbose_name='Username')),
                ('dob', models.DateField(blank=True, null=True, verbose_name='Date of Birth')),
                ('phone', models.CharField(max_length=10, verbose_name='Contact Number')),
                ('about', models.TextField(max_length=500, verbose_name='About')),
                ('experience', models.CharField(choices=[('Beginner', 'Beginner'), ('Amateur', 'Amateur'), ('Semi-Pro', 'Semi-Pro'), ('Professional', 'Professional')], max_length=12, verbose_name='Experience')),
                ('date_joined', models.DateTimeField(auto_now_add=True, verbose_name='Date Joined')),
                ('last_login', models.DateTimeField(auto_now=True, verbose_name='Last Login')),
                ('is_admin', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('is_staff', models.BooleanField(default=False)),
                ('is_superuser', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
            managers=[
                ('objects', accounts.models.UserManager()),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('bio', models.TextField(blank=True, max_length=500)),
                ('avatar',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=accounts.models.user_directory_path,
                     verbose_name='Avatar')),
                ('location', models.CharField(blank=True, max_length=30)),
                ('birth_date', models.DateField(blank=True, null=True)),
                ('email_confirmed', models.BooleanField(default=False)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]