Beispiel #1
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 })
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')),
            ],
        ),
    ]
Beispiel #3
0
class Migration(migrations.Migration):

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

    operations = [
        migrations.AlterField(
            model_name='profile',
            name='area',
            field=models.ForeignKey(
                blank=True,
                default=1,
                on_delete=django.db.models.deletion.PROTECT,
                to='accounts.area'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='color',
            field=models.CharField(blank=True,
                                   default=accounts.models.set_random_color,
                                   max_length=6),
        ),
        migrations.AlterField(
            model_name='profile',
            name='prefecture',
            field=models.ForeignKey(
                blank=True,
                default=1,
                on_delete=django.db.models.deletion.PROTECT,
                to='accounts.prefecture'),
        ),
    ]
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Connection',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('from_user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='creator_set',
                                   to=settings.AUTH_USER_MODEL)),
                ('to_user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='friend_set',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AlterField(
            model_name='profile',
            name='profile_picture',
            field=models.ImageField(blank=True,
                                    null=True,
                                    upload_to=accounts.models.upload_location),
        ),
    ]
Beispiel #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')),
                ('email', models.EmailField(max_length=254, unique=True, verbose_name='email address')),
                ('full_name', models.CharField(blank=True, max_length=30, verbose_name='full name')),
                ('date_joined', models.DateTimeField(auto_now_add=True, verbose_name='date joined')),
                ('is_active', models.BooleanField(default=True, verbose_name='active')),
                ('avatar', models.ImageField(blank=True, null=True, upload_to='avatars/')),
                ('is_staff', models.BooleanField(default=False, verbose_name='is staff')),
                ('is_superuser', models.BooleanField(default=False, verbose_name='is superuser')),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'ordering': ['date_joined'],
            },
            managers=[
                ('objects', accounts.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='UserBalance',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('balance', models.DecimalField(decimal_places=2, default=0, max_digits=12)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_balance', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UserAddress',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('street_address', models.CharField(max_length=128)),
                ('city', models.CharField(max_length=64)),
                ('state', models.CharField(max_length=64)),
                ('country', models.CharField(max_length=64)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='address', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'user address',
                'verbose_name_plural': 'user addresses',
            },
        ),
    ]
Beispiel #6
0
class Migration(migrations.Migration):

    initial = True

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

    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=255, unique=True, verbose_name='email address')),
                ('is_staff', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('is_verified', models.BooleanField(default=False)),
                ('date_joined', models.DateTimeField(auto_now_add=True, help_text='Date user joined Reelio')),
                ('last_updated', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, help_text='Auto update with timestamp when changes are made')),
                ('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={
                'abstract': False,
            },
            managers=[
                ('objects', accounts.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Role',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(help_text='Enter a name for this type of role', max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Token',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('type', models.CharField(choices=[('VERIFY', 'VERIFY'), ('RESET', 'RESET')], max_length=50)),
                ('expires', models.DateTimeField()),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='user',
            name='role',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='accounts.Role'),
        ),
        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'),
        ),
    ]
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=60, unique=True)),
                ('deadline', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='Sequence',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=60, unique=True)),
                ('status', models.CharField(max_length=60)),
                ('description', models.CharField(max_length=255)),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sequences', to='accounts.project')),
            ],
        ),
        migrations.CreateModel(
            name='Shot',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('shotcode', models.CharField(max_length=60, unique=True)),
                ('status', models.CharField(max_length=60)),
                ('cut_in', models.DecimalField(decimal_places=2, max_digits=9)),
                ('cut_out', models.DecimalField(decimal_places=2, max_digits=9)),
                ('cut_duration', models.DecimalField(decimal_places=2, max_digits=9)),
                ('sequence', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='shots', to='accounts.sequence')),
            ],
        ),
        migrations.AlterField(
            model_name='user',
            name='usertype',
            field=models.ForeignKey(default=accounts.models.get_default_artist_usertype, on_delete=django.db.models.deletion.CASCADE, related_name='users', to='accounts.usertype'),
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('task_name', models.CharField(max_length=60, unique=True)),
                ('pipeline_step', models.CharField(max_length=60)),
                ('status', models.CharField(max_length=60)),
                ('startdate', models.DateField()),
                ('duedate', models.DateField()),
                ('assigned_to', models.ManyToManyField(related_name='assignedtasks', to=settings.AUTH_USER_MODEL)),
                ('link', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tasks', to='accounts.shot')),
                ('reviewer', models.ManyToManyField(related_name='taskstoreview', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Beispiel #8
0
class Migration(migrations.Migration):

    dependencies = [
        ('accounts', '0018_auto_20180410_1640'),
    ]

    operations = [
        migrations.AlterField(
            model_name='zeile',
            name='di',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='di',
                to='accounts.Kurs'),
        ),
        migrations.AlterField(
            model_name='zeile',
            name='do',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='do',
                to='accounts.Kurs'),
        ),
        migrations.AlterField(
            model_name='zeile',
            name='fr',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='fr',
                to='accounts.Kurs'),
        ),
        migrations.AlterField(
            model_name='zeile',
            name='mi',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='mi',
                to='accounts.Kurs'),
        ),
        migrations.AlterField(
            model_name='zeile',
            name='mo',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='mo',
                to='accounts.Kurs'),
        ),
        migrations.AlterField(
            model_name='zeile',
            name='zeit',
            field=models.CharField(max_length=5,
                                   verbose_name=accounts.models.Kurs),
        ),
    ]
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')),
                ('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')),
                ('phone_number', models.IntegerField(blank=True, null=True)),
                ('is_subscribed', models.BooleanField(default=False)),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', accounts.models.AccountUserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Subscription',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=10)),
                ('cost', models.DecimalField(decimal_places=2, max_digits=4)),
            ],
        ),
        migrations.CreateModel(
            name='UserSubscriptions',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Subscription', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='accounts.Subscription')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Beispiel #10
0
class Migration(migrations.Migration):

    dependencies = [
        ('company', '0017_remitamandatestatusreport'),
        ('accounts', '0007_thirdpartycreds_remita_dd_api_token'),
    ]

    operations = [
        migrations.CreateModel(
            name='BankAccountType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=128, null=True)),
                ('maximum_withdrawal_amount', models.DecimalField(blank=True, decimal_places=2, max_digits=12, null=True)),
                ('annual_interest_rate', models.DecimalField(decimal_places=2, help_text='Interest rate from 0 - 100', max_digits=5, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100)])),
                ('interest_calculation_per_year', models.PositiveSmallIntegerField(help_text='The number of times interest will be calculated per year', validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(12)])),
            ],
        ),
        migrations.AlterModelManagers(
            name='user',
            managers=[
                ('objects', accounts.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='UserBankAccount',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('account_no', models.PositiveIntegerField(unique=True)),
                ('gender', models.CharField(choices=[('M', 'Male'), ('F', 'Female')], max_length=1)),
                ('birth_date', models.DateField(blank=True, null=True)),
                ('balance', models.DecimalField(decimal_places=2, default=0, max_digits=12)),
                ('interest_start_date', models.DateField(blank=True, help_text='The month number that interest calculation will start from', null=True)),
                ('initial_deposit_date', models.DateField(blank=True, null=True)),
                ('account_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='accounts', to='accounts.BankAccountType')),
                ('company', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='company.Company')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='account', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UserAddress',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('street_address', models.CharField(max_length=512)),
                ('city', models.CharField(max_length=256)),
                ('postal_code', models.PositiveIntegerField()),
                ('country', models.CharField(max_length=256)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='address', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        ('accounts', '0011_auto_20181224_2232'),
    ]

    operations = [
        migrations.CreateModel(
            name='Notification',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('object_id', models.PositiveIntegerField()),
                ('status',
                 models.CharField(choices=[('annonce', 'an annonce'),
                                           ('reply', 'a reply'),
                                           ('message', 'a message')],
                                  default='message',
                                  max_length=20)),
                ('seen', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('content_type',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='notifications',
                                   to='contenttypes.ContentType')),
            ],
            options={
                'verbose_name': 'Notification',
                'verbose_name_plural': 'Notifications',
                'ordering': ['-created'],
            },
            bases=(models.Model, accounts.models.ContentTypeToGetModel),
        ),
        migrations.RemoveField(
            model_name='user',
            name='notifications',
        ),
        migrations.AddField(
            model_name='notification',
            name='receiver',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='notification_receiver',
                to=settings.AUTH_USER_MODEL),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='UserModel',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('full_name',
                 models.CharField(blank=True,
                                  max_length=100,
                                  verbose_name='Full Name')),
                ('profile_pic',
                 models.ImageField(
                     blank=True,
                     upload_to=accounts.models.set_profile_Image_name,
                     verbose_name='profile photo')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='user')),
            ],
        ),
    ]
Beispiel #13
0
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('accounts', '0006_auto_20180410_1320'),
    ]

    operations = [
        migrations.CreateModel(
            name='Certificate',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('user_certificate',
                 models.FileField(
                     upload_to=accounts.models.scramble_uploaded_filename,
                     verbose_name='certificates_files')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('current_user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='graduate_user',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('accounts', '0014_merge_20200616_1652'),
        ('todo', '0009_auto_20200623_1412'),
    ]

    operations = [
        migrations.AlterField(
            model_name='todo',
            name='assigned_to',
            field=models.ForeignKey(
                default=accounts.models.Project_Member,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='todo_assigned_to',
                to='accounts.Project_Member'),
        ),
        migrations.AlterField(
            model_name='todo',
            name='deadline',
            field=models.DateTimeField(default=datetime.datetime.now,
                                       null=True),
        ),
    ]
Beispiel #15
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='NewAccountNonce',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('code',
                 models.CharField(default=accounts.models.make_code,
                                  max_length=12)),
                ('email', models.CharField(max_length=255)),
                ('created',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('invited_by',
                 models.ForeignKey(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', ),
    ]
Beispiel #17
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('auth', '0008_alter_user_username_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='profile', serialize=False, to=settings.AUTH_USER_MODEL, to_field='username')),
                ('name', models.CharField(blank=True, max_length=50)),
                ('phone', models.CharField(blank=True, max_length=11)),
                ('address', models.CharField(blank=True, max_length=100)),
                ('status_msg', models.CharField(blank=True, max_length=100)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('following', models.ManyToManyField(blank=True, related_name='followed_by', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ProfileImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(upload_to=accounts.models.scramble_uploaded_image)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='profile_images', to='accounts.Profile')),
            ],
        ),
    ]
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),
        ),
    ]
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='UserImages',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(
                     upload_to=accounts.models.get_image_filename,
                     verbose_name='Image')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='accounts.UserDetails')),
            ],
        ),
    ]
Beispiel #20
0
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('accounts', '0016_myprofile_wallet'),
    ]

    operations = [
        migrations.CreateModel(
            name='Adv',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('text', tinymce.models.HTMLField(blank=True)),
                ('image',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=accounts.models.get_image_path)),
                ('login', models.CharField(max_length=200)),
                ('pub_date', models.DateTimeField()),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='UserSession',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('session_key', models.CharField(editable=False, max_length=40)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.AlterModelManagers(
            name='user',
            managers=[
                ('objects', accounts.models.UserManager()),
            ],
        ),
        migrations.AlterField(
            model_name='user',
            name='sex',
            field=models.CharField(choices=[('f', 'female'), ('m', 'male')], max_length=1, verbose_name='성별'),
        ),
        migrations.AddField(
            model_name='usersession',
            name='user',
            field=models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
Beispiel #22
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Subject',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('subject_name', models.CharField(max_length=24)),
                ('subject_code',
                 models.CharField(
                     max_length=10,
                     validators=[
                         django.core.validators.RegexValidator(
                             '^[0-9a-zA-Z-]*$',
                             'Only alphanumeric characters are allowed.')
                     ])),
                ('description',
                 models.CharField(
                     max_length=100,
                     validators=[
                         django.core.validators.RegexValidator(
                             '^[0-9a-zA-Z-]*$',
                             'Only alphanumeric characters are allowed.')
                     ])),
            ],
            options={
                'verbose_name': 'Subject',
                'verbose_name_plural': 'Subjects',
            },
        ),
        migrations.CreateModel(
            name='Notes',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=40)),
                ('date', models.DateField()),
                ('file_upload',
                 models.FileField(upload_to=accounts.models.unique_file_path)),
                ('subject',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='accounts.subject')),
            ],
            options={
                'verbose_name': 'Note',
                'verbose_name_plural': 'Notes',
            },
        ),
    ]
Beispiel #23
0
class Migration(migrations.Migration):

    dependencies = [
        ('education', '0002_auto_20200927_1740'),
        ('accounts', '0005_auto_20200930_2257'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='student',
            name='course',
        ),
        migrations.AddField(
            model_name='student',
            name='course',
            field=models.ForeignKey(
                default=2,
                on_delete=django.db.models.deletion.CASCADE,
                to='education.course'),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='student',
            name='resume',
            field=models.FileField(
                blank=True,
                null=True,
                upload_to='student_resume/',
                validators=[accounts.models.resume_validator]),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('first_name', models.CharField(db_index=True, max_length=32)),
                ('last_name', models.CharField(db_index=True, max_length=32)),
                ('iban',
                 django_iban.fields.IBANField(
                     enforce_database_constraint=False,
                     help_text=
                     'Up to 34 chars bank account number, depends on country.',
                     max_length=34,
                     unique=True)),
                ('created_by',
                 models.ForeignKey(null=True,
                                   on_delete=models.SET(
                                       accounts.models.get_sentinel_user),
                                   related_name='customers_added',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Beispiel #25
0
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='ProfilePicture',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('prof_pic',
                 models.ImageField(
                     upload_to=accounts.models.user_directory_path)),
                ('upload_date',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='profile_pic',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
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='土地')),
            ],
        ),
    ]
Beispiel #27
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)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('slug', models.SlugField(blank=True, unique=True)),
                ('title', models.CharField(max_length=150)),
                ('description', tinymce.models.HTMLField(null=True)),
                ('price', models.PositiveSmallIntegerField()),
                ('image', models.URLField(max_length=150)),
                ('arrival_date', models.DateTimeField(auto_now=True)),
                ('seller',
                 models.ForeignKey(default=accounts.models.User,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Beispiel #29
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)),
            ],
        ),
    ]
Beispiel #30
0
class Migration(migrations.Migration):

    dependencies = [
        ('accounts', '0014_user_notification_settings'),
    ]

    operations = [
        migrations.AddField(
            model_name='user',
            name='invited_by',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to=settings.AUTH_USER_MODEL,
                verbose_name='추천인'),
        ),
        migrations.AddField(
            model_name='user',
            name='recommended_code',
            field=models.CharField(editable=False,
                                   max_length=8,
                                   unique=False,
                                   null=True,
                                   blank=True,
                                   verbose_name='추천인 코드'),
        ),
    ]