コード例 #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')),
                ('email', models.EmailField(max_length=254, 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_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', app.models.UserManager()),
            ],
        ),
    ]
コード例 #2
0
ファイル: 0001_initial.py プロジェクト: anvarisy/qbs2_web
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')),
                ('email', models.CharField(max_length=100, primary_key=True, serialize=False)),
                ('full_name', models.CharField(blank=True, max_length=160)),
                ('mobile_number', models.CharField(blank=True, max_length=13)),
                ('is_admin', models.BooleanField(default=False)),
                ('is_login', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now)),
                ('user_photo', models.ImageField(blank=True, upload_to=app.models.user_directory_path)),
                ('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')),
                ('kadiv', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('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,
            },
        ),
    ]
コード例 #3
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='App',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('nom', models.CharField(default='', max_length=100)),
                ('lien', models.CharField(default='', max_length=100)),
                ('avatar',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=app.models.upload_path,
                                   verbose_name='avatar')),
                ('create_at', models.DateTimeField(auto_now_add=True)),
                ('modify_at', models.DateTimeField(auto_now=True)),
                ('domaines', models.ManyToManyField(to='domaine.Domaine')),
            ],
            options={
                'ordering': ['create_at'],
            },
        ),
    ]
コード例 #4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_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')),
                ('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.ASCIIUsernameValidator()], verbose_name='username')),
                ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=30, verbose_name='last name')),
                ('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')),
                ('name', models.CharField(max_length=20, verbose_name='Nome')),
                ('email', models.EmailField(max_length=254, unique=True, verbose_name='E-mail')),
                ('city', models.CharField(max_length=20, verbose_name='Cidade')),
                ('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,
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
            },
            managers=[
                ('objects', app.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=15, verbose_name='Nome')),
                ('price', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='Pre\xe7o')),
                ('stock', models.IntegerField(verbose_name='Estoque')),
            ],
        ),
    ]
コード例 #5
0
ファイル: 0001_initial.py プロジェクト: johannakch/otc-repo
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('day',
                 models.DateField(help_text='Day of the event',
                                  verbose_name='Day of the event')),
                ('start_time',
                 models.TimeField(help_text='Starting time',
                                  verbose_name='Starting time')),
                ('end_time',
                 models.TimeField(help_text='Final time',
                                  verbose_name='Final time')),
                ('notes',
                 models.TextField(blank=True,
                                  help_text='Textual Notes',
                                  null=True,
                                  verbose_name='Textual Notes')),
                ('title', models.CharField(max_length=200)),
                ('type',
                 models.CharField(choices=[
                     (app.models.GameTypeChoice('Doppelspiel'), 'Doppelspiel'),
                     (app.models.GameTypeChoice('Einzelspiel'), 'Einzelspiel'),
                     (app.models.GameTypeChoice('Turnier'), 'Turnier'),
                     (app.models.GameTypeChoice('Event'), 'Event')
                 ],
                                  max_length=5)),
                ('number', models.PositiveSmallIntegerField()),
                ('players',
                 models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Scheduling',
                'verbose_name_plural': 'Scheduling',
            },
        ),
    ]
コード例 #6
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('street_address', models.TextField()),
                ('city', models.CharField(max_length=30)),
                ('state', models.CharField(max_length=30)),
                ('pincode', models.IntegerField()),
                ('country', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('phone_no',
                 models.BigIntegerField(
                     unique=True,
                     validators=[
                         django.core.validators.MaxValueValidator(9999999999),
                         django.core.validators.MinValueValidator(1000000000)
                     ])),
                ('gender',
                 models.CharField(blank=True,
                                  choices=[('M', 'Male'), ('F', 'Female'),
                                           ('O', 'Other')],
                                  max_length=1,
                                  null=True)),
                ('profile_pic',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=app.models.user_directory_path)),
                ('date_of_birth', models.DateField(blank=True, null=True)),
                ('company_address',
                 models.OneToOneField(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='company_address_is',
                     to='app.Address')),
                ('friends',
                 models.ManyToManyField(blank=True,
                                        null=True,
                                        related_name='friends_are',
                                        to=settings.AUTH_USER_MODEL)),
                ('permanent_address',
                 models.OneToOneField(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='permanent_address_is',
                     to='app.Address')),
                ('street_address',
                 models.OneToOneField(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='street_address_is',
                     to='app.Address')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='custom_user_profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
コード例 #7
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Dataset',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('params', models.TextField(verbose_name='params')),
                ('type',
                 models.CharField(choices=[('f', 'File'), ('d', 'Database'),
                                           ('a', 'API')],
                                  max_length=1)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('email',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='email address')),
                ('name', models.CharField(max_length=50)),
                ('is_active',
                 models.BooleanField(default=True, verbose_name='active')),
                ('avatar',
                 models.ImageField(blank=True, null=True,
                                   upload_to='avatars/')),
                ('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', app.models.UserManager()),
            ],
        ),
    ]
コード例 #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')),
                ('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,
            },
        ),
        migrations.CreateModel(
            name='Dataset',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=100, null=True)),
                ('dataset', models.FileField(storage=classify.storage_backends.PrivateMediaStorage(), upload_to='datasets/', validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['xlsx']), app.models.validate_dataset_size])),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('owner', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='owner_datasets', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ('-created',),
            },
        ),
        migrations.CreateModel(
            name='ClassificationModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('saved', models.BooleanField(default=False)),
                ('training_columns', annoying.fields.JSONField(blank=True, deserializer=json.loads, null=True, serializer=annoying.fields.dumps)),
                ('variables', annoying.fields.JSONField(blank=True, deserializer=json.loads, null=True, serializer=annoying.fields.dumps)),
                ('goal', models.CharField(blank=True, max_length=100, null=True)),
                ('trained_model', models.FileField(blank=True, null=True, storage=classify.storage_backends.PrivateMediaStorage(), upload_to='models/')),
                ('training_acc', models.FloatField(blank=True, null=True)),
                ('test_acc', models.FloatField(blank=True, null=True)),
                ('dataset', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='models', to='app.Dataset')),
                ('owner', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='owner_models', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ('-created',),
            },
        ),
    ]
コード例 #9
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Person',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('age', models.IntegerField()),
            ],
        ),
        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=150,
                                  unique=True,
                                  verbose_name='username')),
                ('email',
                 models.EmailField(max_length=254, verbose_name='email')),
                ('is_staff',
                 models.BooleanField(default=False, verbose_name='is_staff')),
                ('is_active',
                 models.BooleanField(default=True, 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={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
            },
            managers=[
                ('objects', app.models.UserManager()),
            ],
        ),
    ]
コード例 #10
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Actor',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=25)),
                ('gender',
                 models.CharField(choices=[
                     (app.models.GenderChoice('Male'), 'Male'),
                     (app.models.GenderChoice('Female'), 'Female')
                 ],
                                  max_length=7)),
                ('birth_date', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='Movie',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=25)),
                ('release_date', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='MovieRating',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('rating',
                 models.IntegerField(validators=[
                     django.core.validators.MaxValueValidator(5),
                     django.core.validators.MinValueValidator(1)
                 ])),
                ('no_of_ratings', models.IntegerField()),
                ('movie',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app.Movie')),
            ],
        ),
        migrations.CreateModel(
            name='MovieCast',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('role', models.CharField(max_length=25)),
                ('cast',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app.Actor')),
                ('movie',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app.Movie')),
            ],
        ),
        migrations.AddField(
            model_name='movie',
            name='actors',
            field=models.ManyToManyField(through='app.MovieCast',
                                         to='app.Actor'),
        ),
    ]
コード例 #11
0
ファイル: 0001_initial.py プロジェクト: mkdirken/XMining
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')),
                ('avatar', models.ImageField(default='users/user.png', upload_to='users', verbose_name='Profil Fotoğrafı')),
                ('hesap', models.FloatField(default=0, verbose_name='Hesap')),
                ('tel', models.CharField(default='(000) 000 00 00', max_length=20, verbose_name='Cep Telefonu')),
                ('tc_no', models.CharField(default='00000000000', max_length=11, verbose_name='T.C Kimlik Numarası')),
                ('bankName', models.CharField(blank=True, default='', max_length=50, verbose_name='Banka Adı')),
                ('iban', models.CharField(blank=True, default='', max_length=40, verbose_name='İban No')),
                ('code', models.CharField(blank=True, default=app.models.random_olustur, max_length=5, verbose_name='Code')),
                ('code_active_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, verbose_name='Kodun Geçerlilik Süresi')),
                ('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',
                'abstract': False,
                'verbose_name_plural': 'users',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Bank',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='Girilmemiş', max_length=100, verbose_name='İşlem')),
                ('date', models.DateField(default=django.utils.timezone.now, verbose_name='İşlem Tarihi')),
                ('pay', models.FloatField(default=0, verbose_name='Ödeme')),
                ('islem', models.CharField(choices=[('GİRDİ', 'GİRDİ'), ('ÇIKTI', 'ÇIKTI')], default='GİRDİ', max_length=20, verbose_name='İşlem Türü')),
                ('user', models.ForeignKey(on_delete=False, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Kasa',
                'verbose_name_plural': 'Kasa',
            },
        ),
        migrations.CreateModel(
            name='Investment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('pay', models.IntegerField(default=0, verbose_name='Yatırım Tutarı')),
                ('date', models.DateTimeField(auto_now_add=True, verbose_name='Yatırım Zamanı')),
                ('status', models.BooleanField(default=False, verbose_name='Hesaba Aktarma')),
                ('user', models.ForeignKey(on_delete=False, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='machine',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(upload_to='machine', verbose_name='Görsel')),
                ('model', models.CharField(max_length=50, verbose_name='Model')),
                ('properties', models.TextField(verbose_name='Özellikler')),
                ('fiyat', models.FloatField(verbose_name='Fiyat')),
                ('miner_power', models.FloatField(verbose_name='Kazım Gücü')),
                ('miner_power_rate', models.CharField(choices=[('TH', 'TH/s'), ('GH', 'GH/s'), ('MH', 'MH/s')], max_length=10, verbose_name='Kazım Güç Türü')),
                ('warranty', models.CharField(choices=[('3 AY', '3 AY'), ('6 AY', '6 AY'), ('9 AY', '9 AY'), ('12 AY', '12 AY'), ('18 AY', '18 AY'), ('24 AY', '24 AY')], max_length=25, verbose_name='Garanti Süresi')),
                ('lifetime', models.IntegerField(choices=[(1, '1 YIL'), (2, '2 YIL')], verbose_name='Kullanım Ömrü')),
            ],
            options={
                'verbose_name': 'Yeni Makine Oluştur',
                'verbose_name_plural': 'Yeni Makine Oluştur',
            },
        ),
        migrations.CreateModel(
            name='news',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200, verbose_name='Başlık')),
                ('post', models.TextField(verbose_name='Kısa Yazı')),
                ('date', models.DateTimeField(auto_now_add=True, verbose_name='Zaman')),
            ],
            options={
                'verbose_name': 'Duyuru Oluştur',
                'verbose_name_plural': 'Duyuru Oluştur',
            },
        ),
        migrations.CreateModel(
            name='Payment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fullname', models.CharField(blank=True, max_length=120, verbose_name='İsim')),
                ('bankname', models.CharField(blank=True, max_length=60, verbose_name='Banka Adı')),
                ('iban', models.CharField(blank=True, max_length=40, verbose_name='İban No')),
                ('amount', models.IntegerField(default=0, verbose_name='Tutar')),
                ('cellphone', models.CharField(blank=True, max_length=20, verbose_name='Telefon Numarası')),
                ('date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Bildirim Gönderim Zamanı')),
                ('status', models.BooleanField(default=False, verbose_name='Ödeme Durumu')),
                ('user', models.ForeignKey(on_delete=False, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Gelen Ödeme Bildirimleri',
                'verbose_name_plural': 'Gelen Ödeme Bildirimleri',
            },
        ),
        migrations.CreateModel(
            name='RequestPayment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fullname', models.CharField(blank=True, max_length=120, verbose_name='İsim')),
                ('bankName', models.CharField(blank=True, max_length=60, verbose_name='Banka Adı')),
                ('iban', models.CharField(blank=True, max_length=40, verbose_name='İban No')),
                ('amount', models.IntegerField(default=0, verbose_name='Tutar')),
                ('date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Talep Tarihi')),
                ('status', models.BooleanField(default=False, verbose_name='Ödeme Durumu')),
                ('user', models.ForeignKey(on_delete=False, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'İstenen Ödeme Talebi',
                'verbose_name_plural': 'İstenen Ödeme Talebi',
            },
        ),
        migrations.CreateModel(
            name='TheMachineGain',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('gain', models.FloatField(verbose_name='Kazanç')),
                ('date', models.DateField(verbose_name='Zaman')),
                ('machine', models.ForeignKey(on_delete=False, to='app.machine', verbose_name='Makina Modeli')),
            ],
            options={
                'verbose_name': 'Makinelerın Günlük Kazancı',
                'verbose_name_plural': 'Makinelerın Günlük Kazancı',
            },
        ),
        migrations.CreateModel(
            name='user_machine',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(verbose_name='Makine Alım Zamanı')),
                ('machine_dead', models.DateTimeField(verbose_name='Makine Ölüm Zamanı')),
                ('miner_power', models.FloatField(verbose_name='Kazım Gücü')),
                ('miner_power_rate', models.CharField(choices=[('TH', 'TH/s'), ('GH', 'GH/s'), ('MH', 'MH/s')], max_length=10, verbose_name='Kazım Güç Türü')),
                ('fiyat', models.FloatField(verbose_name='Fiyat')),
                ('active', models.BooleanField(default=0, verbose_name='Cihaz Aktifliği')),
                ('machine', models.ForeignKey(on_delete=False, to='app.machine')),
                ('user', models.ForeignKey(on_delete=False, related_name='usermachine', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='user_machine_log',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('machine_id', models.IntegerField(verbose_name='Makine ID')),
                ('date', models.DateTimeField()),
                ('machine_dead', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Makina Ölüm Zamanı')),
                ('pay', models.FloatField(default=0, verbose_name='Kazanç')),
                ('payment', models.BooleanField(default=False, verbose_name='Ödeme Yapıldımı')),
                ('user', models.ForeignKey(on_delete=False, to=settings.AUTH_USER_MODEL)),
                ('user_machine', models.ForeignKey(on_delete=False, to='app.user_machine')),
            ],
        ),
    ]
コード例 #12
0
ファイル: 0001_initial.py プロジェクト: wfsiew/mylib-djrest
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')),
                ('userid',
                 models.CharField(db_index=True,
                                  max_length=50,
                                  unique=True,
                                  verbose_name='userid')),
                ('username',
                 models.CharField(db_index=True,
                                  max_length=50,
                                  unique=True,
                                  verbose_name='username')),
                ('email',
                 models.EmailField(db_index=True,
                                   max_length=255,
                                   unique=True,
                                   verbose_name='email address')),
                ('usertype', models.SmallIntegerField()),
                ('is_active',
                 models.BooleanField(default=True, verbose_name='active')),
                ('mobile',
                 models.CharField(blank=True,
                                  max_length=20,
                                  null=True,
                                  verbose_name='mobile')),
                ('firstname',
                 models.CharField(max_length=100, verbose_name='firstname')),
                ('lastname',
                 models.CharField(max_length=100, verbose_name='lastname')),
                ('picture',
                 models.ImageField(blank=True,
                                   max_length=67200,
                                   null=True,
                                   upload_to=app.models.user_dir_path)),
                ('returnbooknotontime',
                 models.IntegerField(blank=True, null=True)),
                ('is_staff',
                 models.BooleanField(default=False,
                                     verbose_name='staff status')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='BlackListUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('user',
                 models.ForeignKey(
                     on_delete=django.db.models.fields.related.ForeignKey,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Book',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('author', models.CharField(max_length=200)),
                ('isbn', models.CharField(max_length=100)),
                ('title', models.CharField(max_length=100)),
                ('description', models.CharField(max_length=200)),
                ('publisher', models.CharField(max_length=200)),
                ('edition', models.CharField(max_length=100)),
                ('category', models.CharField(max_length=100)),
                ('picture',
                 models.ImageField(blank=True,
                                   max_length=21376,
                                   null=True,
                                   upload_to=app.models.book_dir_path)),
                ('barcode', models.CharField(max_length=200, unique=True)),
                ('status', models.SmallIntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Borrow',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('startdate', models.DateField()),
                ('enddate', models.DateField()),
                ('book',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app.Book')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
コード例 #13
0
ファイル: 0001_initial.py プロジェクト: tk525/sample2
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Info',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=200, verbose_name='info name')),
                ('season',
                 models.IntegerField(choices=[(1, 'S/S'), (2, 'A/W')],
                                     default=1,
                                     verbose_name='season')),
                ('info',
                 models.TextField(blank=True,
                                  max_length=300,
                                  null=True,
                                  verbose_name='information')),
                ('created_at',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='registlation date')),
            ],
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=200,
                                  verbose_name='product name')),
                ('age',
                 models.IntegerField(
                     blank=True,
                     null=True,
                     validators=[django.core.validators.MinValueValidator(1)],
                     verbose_name='price')),
                ('sex',
                 models.IntegerField(choices=[(1, 'man'), (2, 'woman'),
                                              (3, 'child')],
                                     default=1,
                                     verbose_name='gender')),
                ('memo',
                 models.TextField(blank=True,
                                  max_length=300,
                                  null=True,
                                  verbose_name='add information')),
                ('created_at',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='registlation date')),
                ('description', models.CharField(blank=True, max_length=255)),
                ('photo',
                 models.ImageField(default='defo', upload_to='documents/')),
                ('uploaded_at', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'verbose_name': 'item',
                'verbose_name_plural': 'item',
            },
        ),
        migrations.CreateModel(
            name='Shipments',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('mail', models.CharField(max_length=200,
                                          verbose_name='mail')),
                ('product_name',
                 models.CharField(max_length=200,
                                  verbose_name='product_name')),
                ('price',
                 models.IntegerField(
                     default=0,
                     validators=[
                         django.core.validators.MinValueValidator(0),
                         django.core.validators.MaxValueValidator(100)
                     ],
                     verbose_name='price')),
                ('sex',
                 models.IntegerField(
                     default=0,
                     validators=[
                         django.core.validators.MinValueValidator(0),
                         django.core.validators.MaxValueValidator(100)
                     ],
                     verbose_name='price')),
                ('created_at',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='registlation date')),
            ],
        ),
        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')),
                ('user_or_owner',
                 models.BooleanField(default=False,
                                     verbose_name='user_or_owner')),
                ('is_staff',
                 models.BooleanField(
                     default=True,
                     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_superuser',
                 models.BooleanField(default=True, verbose_name='superuser')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('buys',
                 models.ManyToManyField(blank=True,
                                        related_name='buys',
                                        to='app.Item')),
                ('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', app.models.UserManager()),
            ],
        ),
    ]
コード例 #14
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('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_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_online', models.BooleanField(default=False)),
                ('avatar', models.FileField(blank=True, null=True, upload_to=app.models.content_file_name_user, 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', app.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(blank=True, max_length=50, null=True, verbose_name='Пароль')),
                ('creator_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='creator', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UserChar',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('biodate', models.CharField(blank=True, max_length=5, null=True, verbose_name='Биологические данные')),
                ('job', models.CharField(blank=True, max_length=5, null=True, verbose_name='Профессия')),
                ('health', models.CharField(blank=True, max_length=5, null=True, verbose_name='Здоровье')),
                ('phobia', models.CharField(blank=True, max_length=5, null=True, verbose_name='Фобия')),
                ('hobby', models.CharField(blank=True, max_length=5, null=True, verbose_name='Хобби')),
                ('addinfo', models.CharField(blank=True, max_length=5, null=True, verbose_name='Допольнительная информация')),
                ('character', models.CharField(blank=True, max_length=5, null=True, verbose_name='Характер')),
                ('baggage', models.CharField(blank=True, max_length=5, null=True, verbose_name='Багаж')),
                ('spell_1', models.CharField(blank=True, max_length=5, null=True, verbose_name='Карта способности 1')),
                ('spell_2', models.CharField(blank=True, max_length=5, null=True, verbose_name='Карта способности 2')),
                ('player', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='player', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='GameRules',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(blank=True, max_length=5, null=True, verbose_name='Тип Катастрофы')),
                ('area', models.CharField(blank=True, max_length=5, null=True, verbose_name='Площадь')),
                ('days', models.CharField(blank=True, max_length=5, null=True, verbose_name='Количество дней')),
                ('items', models.CharField(blank=True, max_length=5, null=True, verbose_name='Предметы находящие в бункере')),
                ('population', models.CharField(blank=True, max_length=5, null=True, verbose_name='Количество(%) население оставщихся людей в мире')),
                ('desc', models.CharField(blank=True, max_length=5, null=True, verbose_name='Описание')),
                ('game', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='game', to='app.game')),
            ],
        ),
    ]
コード例 #15
0
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Initiative',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('title_pt', models.CharField(max_length=100)),
                ('content', models.TextField()),
                ('content_pt', models.TextField()),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='InitiativeEvent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('title_pt', models.CharField(max_length=100)),
                ('content', models.TextField()),
                ('content_pt', models.TextField()),
                ('image', models.ImageField(upload_to=app.models.PathAndRename('img/partners'))),
                ('date', models.DateTimeField()),
                ('facebook', models.URLField(blank=True, null=True)),
                ('initiative', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Initiative')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Partner',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('url', models.URLField(blank=True, null=True)),
                ('name', models.CharField(max_length=128)),
                ('image', models.ImageField(upload_to=app.models.PathAndRename('img/initiative_events/'))),
            ],
        ),
        migrations.AlterField(
            model_name='community',
            name='image',
            field=models.ImageField(blank=True, upload_to=app.models.PathAndRename('img/communities/')),
        ),
        migrations.AlterField(
            model_name='news',
            name='image',
            field=models.ImageField(blank=True, null=True, upload_to=app.models.PathAndRename('img/news/')),
        ),
        migrations.AlterField(
            model_name='projects',
            name='image',
            field=models.ImageField(blank=True, upload_to=app.models.PathAndRename('img/projects/')),
        ),
        migrations.AlterField(
            model_name='volunteer',
            name='image',
            field=models.ImageField(upload_to=app.models.PathAndRename('img/volunteers/')),
        ),
        migrations.AddField(
            model_name='initiative',
            name='community',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Community'),
        ),
        migrations.AddField(
            model_name='initiative',
            name='partners',
            field=models.ManyToManyField(blank=True, null=True, to='app.Partner'),
        ),
    ]
コード例 #16
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Audiotrack',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Country',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('alias', models.CharField(max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='Cover',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('upload_path',
                 models.ImageField(
                     blank=True,
                     max_length=256,
                     null=True,
                     upload_to=app.models.cover.Cover.get_file_path,
                     verbose_name='Poster')),
            ],
        ),
        migrations.CreateModel(
            name='Director',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('original_name', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='DVD',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('original_title', models.CharField(max_length=200)),
                ('description', models.TextField()),
                ('cover',
                 models.ForeignKey(default=1,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='app.Cover')),
            ],
        ),
        migrations.CreateModel(
            name='Film',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('original_title', models.CharField(max_length=200)),
                ('description', models.TextField()),
                ('time_ms', models.PositiveIntegerField(default=2)),
                ('audiotracks',
                 models.ManyToManyField(blank=True, to='app.Audiotrack')),
                ('countries',
                 models.ManyToManyField(blank=True, to='app.Country')),
                ('cover',
                 models.ForeignKey(default=1,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='app.Cover')),
                ('directors',
                 models.ManyToManyField(blank=True, to='app.Director')),
                ('dvd',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='app.DVD')),
            ],
        ),
        migrations.CreateModel(
            name='Language',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('alias', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Mediacontainer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Screenshot',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('upload_path',
                 models.ImageField(
                     blank=True,
                     max_length=256,
                     null=True,
                     upload_to=app.models.screenshot.Screenshot.get_file_path,
                     verbose_name='Poster')),
            ],
        ),
        migrations.CreateModel(
            name='Season',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('number', models.PositiveIntegerField(default=1)),
                ('cover',
                 models.ForeignKey(default=1,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='app.Cover')),
            ],
        ),
        migrations.CreateModel(
            name='Serial',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('original_title', models.CharField(max_length=200)),
                ('countries', models.ManyToManyField(to='app.Country')),
                ('cover',
                 models.ForeignKey(default=1,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='app.Cover')),
                ('directors', models.ManyToManyField(to='app.Director')),
            ],
        ),
        migrations.CreateModel(
            name='Studio',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Subtitles',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('language',
                 models.ForeignKey(default=1,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='app.Language')),
            ],
        ),
        migrations.CreateModel(
            name='Videoformat',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('resolution', models.CharField(max_length=200)),
                ('ratio', models.CharField(max_length=200)),
                ('format', models.CharField(max_length=200)),
            ],
        ),
        migrations.AddField(
            model_name='serial',
            name='studios',
            field=models.ManyToManyField(to='app.Studio'),
        ),
        migrations.AddField(
            model_name='season',
            name='serial',
            field=models.ForeignKey(
                default=1,
                on_delete=django.db.models.deletion.CASCADE,
                to='app.Serial'),
        ),
        migrations.AddField(
            model_name='film',
            name='mediacontainer',
            field=models.ForeignKey(
                blank=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='app.Mediacontainer'),
        ),
        migrations.AddField(
            model_name='film',
            name='original_language',
            field=models.ForeignKey(
                default=1,
                on_delete=django.db.models.deletion.CASCADE,
                to='app.Language'),
        ),
        migrations.AddField(
            model_name='film',
            name='screenshots',
            field=models.ManyToManyField(blank=True, to='app.Screenshot'),
        ),
        migrations.AddField(
            model_name='film',
            name='season',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='app.Season'),
        ),
        migrations.AddField(
            model_name='film',
            name='serial',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='app.Serial'),
        ),
        migrations.AddField(
            model_name='film',
            name='studios',
            field=models.ManyToManyField(blank=True, to='app.Studio'),
        ),
        migrations.AddField(
            model_name='film',
            name='subtitles',
            field=models.ManyToManyField(blank=True, to='app.Subtitles'),
        ),
        migrations.AddField(
            model_name='film',
            name='videoformat',
            field=models.ForeignKey(
                default=1,
                on_delete=django.db.models.deletion.CASCADE,
                to='app.Videoformat'),
        ),
    ]
コード例 #17
0
ファイル: 0001_initial.py プロジェクト: jz5jx/quickTutor
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('email', models.EmailField(max_length=254, unique=True, verbose_name='email address')),
                ('username', models.CharField(default='None', max_length=15)),
                ('description', models.CharField(default='New User', max_length=200)),
                ('image', models.ImageField(default='default.jpg', upload_to='profile_pics')),
                ('has_active_request', models.BooleanField(default=False)),
                ('reviewable_tutor', models.CharField(default='None', max_length=100)),
                ('reviewable_tutee', models.CharField(default='None', max_length=100)),
                ('contacts', models.ManyToManyField(blank=True, to=settings.AUTH_USER_MODEL)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', app.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Review',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=500)),
                ('rating', models.IntegerField()),
                ('reviewee', models.CharField(max_length=100)),
                ('reviewer', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Request',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('location', models.CharField(max_length=200)),
                ('pub_date', models.DateTimeField(max_length=100, verbose_name='date published')),
                ('description', models.CharField(max_length=1000)),
                ('user', models.CharField(max_length=100)),
                ('tutors', models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.CharField(max_length=1000)),
                ('timestamp', models.DateTimeField(verbose_name='timestamp')),
                ('receiver', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='receiver', to=settings.AUTH_USER_MODEL)),
                ('sender', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sender', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Conversation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('messages', models.ManyToManyField(to='app.Message')),
                ('participants', models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
コード例 #18
0
ファイル: 0001_initial.py プロジェクト: dev-mcpark/backpac
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Member',
            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=100,
                                   unique=True,
                                   verbose_name='email')),
                ('username',
                 models.CharField(
                     help_text=
                     'Required. 20 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=20,
                     validators=[app.models.UsernameValidator()],
                     verbose_name='username')),
                ('nickname', models.CharField(max_length=30)),
                ('phone', models.CharField(max_length=20)),
                ('gender',
                 models.CharField(blank=True,
                                  choices=[('M', 'Male'), ('F', 'Female')],
                                  max_length=1,
                                  null=True)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'member',
                'verbose_name_plural': 'members',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('order_number', models.CharField(max_length=12, unique=True)),
                ('product', models.CharField(max_length=100)),
                ('payment_date', models.DateTimeField()),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
コード例 #19
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', app.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='HistoricalPrinter',
            fields=[
                ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('auth_token', models.CharField(db_index=True, max_length=28)),
                ('current_print_filename', models.CharField(blank=True, max_length=1000, null=True)),
                ('current_print_started_at', models.DateTimeField(null=True)),
                ('current_print_alerted_at', models.DateTimeField(null=True)),
                ('current_print_alert_muted', models.BooleanField(default=False)),
                ('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)),
                ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('user', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'historical printer',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='Printer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('auth_token', models.CharField(max_length=28, unique=True)),
                ('current_print_filename', models.CharField(blank=True, max_length=1000, null=True)),
                ('current_print_started_at', models.DateTimeField(null=True)),
                ('current_print_alerted_at', models.DateTimeField(null=True)),
                ('current_print_alert_muted', models.BooleanField(default=False)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='PrinterCommand',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('command', models.CharField(max_length=2000)),
                ('status', models.CharField(choices=[('PENDING', 'pending'), ('SENT', 'sent')], default='PENDING', max_length=10)),
                ('printer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Printer')),
            ],
        ),
    ]
コード例 #20
0
ファイル: 0001_initial.py プロジェクト: nobu04/PaintStock
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',
            },
            managers=[
                ('objects', app.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Buyer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('buyername', models.CharField(max_length=200)),
                ('email',
                 models.CharField(max_length=200, verbose_name='メールアドレス')),
                ('gender',
                 models.IntegerField(choices=[(1, '男性'), (2, '女性')],
                                     default=1,
                                     verbose_name='性別')),
                ('age', models.IntegerField(verbose_name='年齢')),
                ('adress', models.CharField(max_length=200,
                                            verbose_name='住所')),
            ],
            options={
                'verbose_name': 'バイヤー',
                'verbose_name_plural': 'バイヤー',
            },
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=200,
                                          verbose_name='タイトル')),
                ('image',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to='pictures/',
                                   verbose_name='画像')),
                ('status',
                 models.IntegerField(choices=[(1, '所持'), (2, '売却'), (3, '廃棄')],
                                     default=1,
                                     verbose_name='ステータス')),
                ('size',
                 models.CharField(default='20角',
                                  max_length=200,
                                  verbose_name='サイズ')),
                ('category',
                 models.IntegerField(choices=[(1, '作品'), (2, '額縁')],
                                     default=1,
                                     verbose_name='カテゴリー')),
                ('memo',
                 models.TextField(blank=True,
                                  max_length=300,
                                  null=True,
                                  verbose_name='備考')),
                ('created_at',
                 models.DateTimeField(auto_now_add=True, verbose_name='登録日')),
                ('user',
                 models.ForeignKey(default=1,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='items',
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='作家')),
            ],
        ),
        migrations.AddField(
            model_name='buyer',
            name='item',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='buyer',
                to='app.Item',
                verbose_name='作品'),
        ),
    ]
コード例 #21
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Assignment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('created_date', models.DateTimeField(default=django.utils.timezone.now)),
                ('deadline', models.DateTimeField(default=django.utils.timezone.now)),
                ('language', models.CharField(choices=[('Python3', 'Python3'), ('Java', 'Java'), ('C++', 'C++'), ('C', 'C'), ('PHP', 'PHP'), ('Bash', 'Bash')], max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Institution',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=200, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=500)),
                ('description', models.TextField(blank=True)),
                ('sample_input', models.TextField(blank=True)),
                ('sample_output', models.TextField(blank=True)),
                ('marks', models.IntegerField(blank=True, null=True)),
                ('draft', models.BooleanField(default=False)),
                ('check_plagiarism', models.BooleanField(default=True)),
                ('created_date', models.DateTimeField(default=django.utils.timezone.now)),
                ('assignment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Assignment')),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('profile_pic', models.ImageField(blank=True, null=True, upload_to='StudentProfilePic')),
                ('course', models.CharField(blank=True, max_length=50)),
                ('roll_no', models.IntegerField()),
                ('institution', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.Institution')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Solution',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sub_date', models.DateTimeField(default=django.utils.timezone.now)),
                ('status', models.CharField(choices=[('accepted', 'Accepted'), ('partially-submit', 'Partially Submitted'), ('wrong', 'Wrong Answer'), ('not-attempted', 'Not Attempted')], default='not-attempted', max_length=100)),
                ('submission', models.FileField(storage=app.storage.OverwriteStorage(), upload_to=app.models.submission_directory_path)),
                ('remark', models.CharField(blank=True, max_length=500)),
                ('assignment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Assignment')),
                ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Question')),
                ('student', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='app.Student')),
            ],
        ),
        migrations.CreateModel(
            name='Professor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('profile_pic', models.ImageField(blank=True, null=True, upload_to='ProfessorProfilePic')),
                ('moss_id', models.CharField(blank=True, max_length=50, null=True)),
                ('institution', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.Institution')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='PlagResult',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('perc_1', models.IntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100)])),
                ('perc_2', models.IntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100)])),
                ('lines_matched', models.CharField(max_length=100)),
                ('lines_match_count', models.IntegerField()),
                ('moss_page_url', models.URLField()),
                ('created_date', models.DateTimeField(default=django.utils.timezone.now)),
                ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Question')),
                ('solution_1', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='solution_1', to='app.Solution')),
                ('solution_2', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='solution_2', to='app.Solution')),
            ],
        ),
        migrations.CreateModel(
            name='Classroom',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('created_date', models.DateTimeField(default=django.utils.timezone.now)),
                ('join_code', models.CharField(default=app.models.random_code, editable=False, max_length=5, unique=True)),
                ('professor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Professor')),
                ('students', models.ManyToManyField(blank=True, to='app.Student')),
            ],
            options={
                'verbose_name': 'Classroom',
                'verbose_name_plural': 'Classrooms',
            },
        ),
        migrations.AddField(
            model_name='assignment',
            name='classroom',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Classroom'),
        ),
    ]
コード例 #22
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('email', models.EmailField(max_length=50, unique=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={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nickName', models.CharField(max_length=100)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('img',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=app.models.upload_avatar_path)),
                ('userProfile',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='userProfile',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('img',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=app.models.upload_post_path)),
                ('liked',
                 models.ManyToManyField(blank=True,
                                        related_name='liked',
                                        to=settings.AUTH_USER_MODEL)),
                ('userPost',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='userPost',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('text', models.CharField(max_length=100)),
                ('post',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app.post')),
                ('userComment',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='userComment',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
コード例 #23
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
    ]

    operations = [
        migrations.CreateModel(
            name='LegalAgreement',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(editable=False)),
                ('modified', models.DateTimeField(editable=False)),
                ('label', models.CharField(default='', max_length=100)),
                ('slug', models.CharField(default='', max_length=100)),
                ('content', models.TextField(blank=True, default='')),
                ('pdf',
                 models.FileField(blank=True, default='', upload_to='legal')),
                ('sign', models.BooleanField(default=False)),
                ('is_linked', models.BooleanField(default=False)),
                ('publicly_visible', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PdfGeneration',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(editable=False)),
                ('modified', models.DateTimeField(editable=False)),
                ('name', models.CharField(default='', max_length=100)),
                ('pdf_file',
                 models.FileField(default=None,
                                  null=True,
                                  storage=app.files.SecureFileSystemStorage(),
                                  upload_to='pdf_generation')),
                ('pagesize',
                 models.CharField(blank=True,
                                  choices=[('LETTER', 'Letter'),
                                           ('LEGAL', 'Legal'), ('A4', 'A4')],
                                  default='LETTER',
                                  max_length=100)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PdfGenerationField',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(editable=False)),
                ('modified', models.DateTimeField(editable=False)),
                ('page_number', models.PositiveIntegerField()),
                ('x', models.PositiveIntegerField()),
                ('y', models.PositiveIntegerField()),
                ('field_type',
                 models.CharField(choices=[('string', 'Text Field'),
                                           ('signature', 'Signature'),
                                           ('checkbox', 'Checkbox'),
                                           ('image', 'Image Field')],
                                  default='string',
                                  max_length=100)),
                ('field_name', models.CharField(default='', max_length=100)),
                ('field_model',
                 models.ForeignKey(default=None,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='contenttypes.ContentType')),
                ('pdf',
                 models.ForeignKey(default=None,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='app.PdfGeneration')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SecureUpload',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(editable=False)),
                ('modified', models.DateTimeField(editable=False)),
                ('name', models.CharField(default='', max_length=200)),
                ('upload',
                 models.FileField(default=None,
                                  null=True,
                                  storage=app.files.SecureFileSystemStorage(),
                                  upload_to=app.models.secure_upload_path)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='WorkflowWizard',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(editable=False)),
                ('modified', models.DateTimeField(editable=False)),
                ('is_template', models.BooleanField(default=False)),
                ('name', models.CharField(default='', max_length=200)),
                ('active', models.BooleanField(default=False)),
                ('deleted', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='WorkflowWizardForm',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(editable=False)),
                ('modified', models.DateTimeField(editable=False)),
                ('name', models.CharField(default='', max_length=200)),
                ('description', models.TextField(default='')),
                ('active', models.BooleanField(default=False)),
                ('deleted', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='WorkflowWizardFormField',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(editable=False)),
                ('modified', models.DateTimeField(editable=False)),
                ('name', models.CharField(default='', max_length=200)),
                ('description', models.TextField(default='')),
                ('active', models.BooleanField(default=False)),
                ('deleted', models.BooleanField(default=False)),
                ('required', models.BooleanField(default=False)),
                ('ordering', models.PositiveIntegerField(default=2000)),
                ('form',
                 models.ForeignKey(default=None,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='fields',
                                   to='app.WorkflowWizardForm')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='WorkflowWizardStep',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(editable=False)),
                ('modified', models.DateTimeField(editable=False)),
                ('name', models.CharField(default='', max_length=200)),
                ('description', models.TextField(default='')),
                ('completion_code',
                 models.CharField(blank=True, default='', max_length=100)),
                ('active', models.BooleanField(default=False)),
                ('deleted', models.BooleanField(default=False)),
                ('required', models.BooleanField(default=False)),
                ('ordering', models.PositiveIntegerField(default=2000)),
                ('employer',
                 models.BooleanField(default=False,
                                     verbose_name='Employer Step')),
                ('agreement',
                 models.ForeignKey(blank=True,
                                   default=None,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='app.LegalAgreement')),
                ('form',
                 models.ForeignKey(default=None,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='app.WorkflowWizardForm')),
                ('pdfgen',
                 models.ManyToManyField(blank=True,
                                        to='app.PdfGeneration',
                                        verbose_name='PDF Forms (Generated)')),
                ('workflow_wizard',
                 models.ForeignKey(default=None,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='steps',
                                   to='app.WorkflowWizard')),
            ],
            options={
                'ordering': ['workflow_wizard__id', 'ordering'],
            },
        ),
    ]
コード例 #24
0
class Migration(migrations.Migration):

    replaces = [(b'app', '0001_squashed_0016_auto_20160711_1619'),
                (b'app', '0002_auto_20160714_1451'),
                (b'app', '0003_auto_20160714_1505'),
                (b'app', '0004_auto_20160714_1506'),
                (b'app', '0005_auto_20160714_1509'),
                (b'app', '0006_auto_20160714_1536'),
                (b'app', '0007_auto_20160714_1538'),
                (b'app', '0008_auto_20160719_1119'),
                (b'app', '0009_auto_20160719_1122'),
                (b'app', '0010_auto_20160809_1832'),
                (b'app', '0011_remove_biomsearchjob_otu_text'),
                (b'app', '0012_auto_20160810_1320'),
                (b'app', '0013_auto_20160814_1645'),
                (b'app', '0014_auto_20160815_1213')]

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='EcosystemChoice',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('ecosystem',
                 models.CharField(max_length=60,
                                  verbose_name='Ecosystem Type')),
                ('ecosystem_proper_name',
                 models.CharField(default='Test', max_length=60)),
            ],
        ),
        migrations.CreateModel(
            name='BiomSearchJob',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
                ('criteria',
                 models.ManyToManyField(max_length=3,
                                        to=b'app.EcosystemChoice')),
                ('biom_file',
                 models.FileField(blank=True,
                                  null=True,
                                  upload_to=app.models.upload_path_handler)),
                ('status',
                 models.IntegerField(choices=[(-1, b'Stopped'), (1, b'Queued'),
                                              (0, b'Validating'),
                                              (2, b'Processing'),
                                              (10, b'Completed')],
                                     default=0)),
                ('error_code',
                 models.IntegerField(choices=[
                     (0, b'No errors.'),
                     (1,
                      b'File/text content has errors. Check JSON/TSV content.'
                      ), (2, b'Too many samples, only 1 sample allowed.'),
                     (3, b'Duplicate observation IDs.'),
                     (-1, b'Error opening uploaded file. Contact site admin.'),
                     (4,
                      b'Some OTUs do not exist in the database. Cannot proceed.'
                      ),
                     (5,
                      b'An error occurred. This may be a problem with the system. Try again or contact site admin.'
                      )
                 ],
                                     default=0)),
                ('sample_name',
                 models.CharField(default=b'(no name)', max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Guest',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('status', models.BooleanField(default=False)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AlterField(
            model_name='ecosystemchoice',
            name='ecosystem_proper_name',
            field=models.CharField(max_length=60),
        ),
    ]
コード例 #25
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')),
                ('grade',
                 models.IntegerField(blank=True,
                                     default=0,
                                     null=True,
                                     verbose_name='grade')),
                ('school_name',
                 models.CharField(max_length=100,
                                  null=True,
                                  verbose_name='school name')),
                ('email',
                 models.EmailField(max_length=254,
                                   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')),
                ('society_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='society name')),
                ('is_student', models.BooleanField(default=False)),
                ('is_society', models.BooleanField(default=False)),
                ('is_company', models.BooleanField(default=False)),
                ('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', app.models.CustomUserManager()),
            ],
        ),
        migrations.CreateModel(
            name='BoardModel',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100,
                                           verbose_name='タイトル')),
                ('content', models.TextField(verbose_name='本文')),
                ('author', models.CharField(max_length=100)),
                ('images',
                 models.ImageField(blank=True,
                                   upload_to='image',
                                   verbose_name='画像')),
                ('good', models.IntegerField()),
                ('read', models.IntegerField()),
                ('readtext', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Company',
            fields=[
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     related_name='company',
                     serialize=False,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     related_name='student',
                     serialize=False,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
コード例 #26
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('code', models.CharField(max_length=10)),
                ('description', models.CharField(max_length=10)),
                ('price',
                 models.DecimalField(blank=True,
                                     decimal_places=2,
                                     max_digits=10,
                                     null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('code', models.CharField(max_length=10)),
                ('picture',
                 models.FileField(blank=True,
                                  null=True,
                                  upload_to=app.models.Customer.url)),
                ('addres', models.CharField(max_length=100)),
                ('type_customer', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('order_number', models.IntegerField(blank=True, null=True)),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('supplied_date', models.DateTimeField(auto_now_add=True)),
                ('is_urgent', models.BooleanField()),
                ('type_order', models.IntegerField(blank=True, null=True)),
                ('cedis', models.CharField(max_length=50)),
                ('reference', models.CharField(max_length=50)),
                ('brach_code', models.IntegerField(blank=True, null=True)),
                ('partner_code', models.IntegerField(blank=True, null=True)),
                ('is_supplied', models.BooleanField()),
                ('customer',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app.Customer')),
            ],
        ),
        migrations.CreateModel(
            name='Supplier',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('addres', models.CharField(max_length=100)),
                ('articles', models.ManyToManyField(to='app.Article')),
            ],
        ),
        migrations.CreateModel(
            name='OrderDetail',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('quantity', models.IntegerField(blank=True, null=True)),
                ('article',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app.Article')),
                ('order',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app.Order')),
            ],
        ),
    ]
コード例 #27
0
ファイル: 0001_initial.py プロジェクト: Execut3/Held-CTF
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')),
                ('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(
                     help_text=
                     'باید شامل حرف، عدد و کاراکترهای @ . + - _  بوده و نباید تعداد کاراکترها بیش از ۳۰ باشد.',
                     max_length=30,
                     unique=True,
                     validators=[
                         django.core.validators.RegexValidator(
                             re.compile('^[\\w.@+-]+$', 32),
                             'Enter a valid username.', 'invalid')
                     ],
                     verbose_name='نام کاربری')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  null=True,
                                  verbose_name='نام')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  null=True,
                                  verbose_name='نام خانوادگی')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=255,
                                   null=True,
                                   verbose_name='آدرس ایمیل')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'نشان می\u200cدهد که آیا این کاربر می\u200cتواند وارد این وبگاه مدیریت شود یا خیر.',
                     verbose_name='وضعیت کارمندی')),
                ('is_active',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether this user should be treated as active. Deselect this instead of deleting accounts.',
                     verbose_name='فعال')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='تاریخ پیوستن')),
                ('receive_newsletter',
                 models.BooleanField(default=False,
                                     verbose_name='receive newsletter')),
                ('avatar',
                 models.ImageField(
                     blank=True,
                     max_length=1500,
                     null=True,
                     upload_to=app.models.avatar_images_upload_address)),
                ('created_at', 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={
                'verbose_name': 'کاربر',
                'verbose_name_plural': 'کاربرها',
            },
        ),
    ]
コード例 #28
0
ファイル: 0001_initial.py プロジェクト: dexpjar/cabd
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='App',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('taskcode',
                 models.CharField(blank=True,
                                  max_length=100,
                                  null=True,
                                  verbose_name='TaskCode')),
                ('name', models.CharField(max_length=100,
                                          verbose_name='Name')),
                ('description',
                 models.TextField(blank=True,
                                  null=True,
                                  verbose_name='Description')),
                ('citation',
                 models.TextField(blank=True,
                                  null=True,
                                  verbose_name='Citation')),
                ('image',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=app.models.image_upload_location,
                                   verbose_name='Image')),
                ('command',
                 models.CharField(max_length=100, verbose_name='Command')),
                ('app_compatibility',
                 models.ManyToManyField(
                     blank=True,
                     related_name='_app_app_compatibility_+',
                     to='app.App')),
            ],
        ),
        migrations.CreateModel(
            name='ImageSlideshow',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(upload_to=app.models.image_upload_location,
                                   verbose_name='Image')),
                ('title', models.CharField(max_length=100,
                                           verbose_name='Title')),
            ],
        ),
        migrations.CreateModel(
            name='MyCompany',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('logo',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to=app.models.image_upload_location,
                                   verbose_name='Logo')),
                ('name', models.CharField(max_length=100,
                                          verbose_name='Name')),
                ('address', models.TextField(blank=True,
                                             verbose_name='Address')),
                ('phone',
                 models.CharField(blank=True,
                                  max_length=9,
                                  verbose_name='Phone')),
                ('email',
                 models.EmailField(max_length=254, verbose_name='Email')),
                ('citations', models.TextField(verbose_name='Citations')),
            ],
        ),
        migrations.CreateModel(
            name='ParamsInput',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100,
                                          verbose_name='Name')),
                ('state',
                 models.CharField(choices=[('text', 'Text'), ('file', 'File')],
                                  default='text',
                                  max_length=15)),
                ('allowed_format',
                 models.CharField(max_length=100,
                                  verbose_name='Allowed Format')),
                ('app',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='param_app',
                                   to='app.App')),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('institution',
                 models.CharField(blank=True,
                                  max_length=100,
                                  null=True,
                                  verbose_name='Institution')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['user'],
                'verbose_name': 'Profile',
                'verbose_name_plural': 'Profiles',
            },
        ),
        migrations.CreateModel(
            name='Section',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100,
                                           verbose_name='Title')),
                ('description', models.TextField(verbose_name='Section')),
                ('app',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='app.App')),
                ('subsection',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='app.Section')),
            ],
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100,
                                          verbose_name='Name')),
                ('state',
                 models.CharField(choices=[('pending', 'Pending'),
                                           ('in_queue', 'In Queue'),
                                           ('completed', 'Completed'),
                                           ('canceled', 'Canceled')],
                                  default='pending',
                                  max_length=15)),
                ('creation_date',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='Creation Date')),
                ('file_input',
                 models.FileField(upload_to='files/input/',
                                  verbose_name='File Input')),
                ('file_output',
                 models.FileField(blank=True,
                                  upload_to='files/output/',
                                  verbose_name='File Output')),
                ('app',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='application',
                                   to='app.App')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='user',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
コード例 #29
0
ファイル: 0001_initial.py プロジェクト: enesSerkanGulec/kamu
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('email',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='email address')),
                ('kurum',
                 models.CharField(max_length=100,
                                  null=True,
                                  verbose_name='Kurum')),
                ('kurum_adres',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='Kurum adresi')),
                ('kurum_telefon',
                 models.CharField(
                     max_length=17,
                     null=True,
                     validators=[
                         django.core.validators.RegexValidator(
                             message=
                             "Telefon numarası şu şeklillerden biri gibi olmalı: '+9999999999' veya '9999999999' veya '999 9999999' veya '999 999 9999' veya '999 999 99 99'.",
                             regex=
                             '^\\+?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{2} ?[0-9]{2}$'
                         )
                     ],
                     verbose_name='Kurum telefonu')),
                ('kurum_web_adres',
                 models.URLField(null=True, verbose_name='Kurum web adresi')),
                ('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': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', app.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='il',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('adi', models.CharField(max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='ilan',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('ad',
                 models.CharField(max_length=40,
                                  null=True,
                                  verbose_name='ilan adı')),
                ('adet',
                 models.IntegerField(default=1, null=True,
                                     verbose_name='Adet')),
                ('aciklama',
                 models.TextField(blank=True, verbose_name='Açıklama')),
                ('yayinda',
                 models.BooleanField(default=True, verbose_name='Yayında')),
                ('olusturma_tarihi', models.DateField(auto_now=True)),
                ('silme_tarihi', models.DateField(blank=True, null=True)),
                ('kurum',
                 models.CharField(blank=True, max_length=200, null=True)),
                ('kucuk_resim',
                 models.ImageField(blank=True,
                                   editable=False,
                                   null=True,
                                   upload_to='silinenilanlar')),
            ],
        ),
        migrations.CreateModel(
            name='ilce',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('adi', models.CharField(max_length=35)),
                ('ill',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app.il')),
            ],
        ),
        migrations.CreateModel(
            name='Resim',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('resim',
                 models.ImageField(null=True,
                                   upload_to='',
                                   verbose_name='Resim')),
                ('kucukResim',
                 models.ImageField(blank=True,
                                   editable=False,
                                   null=True,
                                   upload_to='thumbs')),
                ('ilan',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='app.ilan')),
            ],
            options={
                'ordering': ['ilan'],
            },
        ),
        migrations.CreateModel(
            name='Mesajlar',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('yon',
                 models.CharField(choices=[('gelen', 'gelen'),
                                           ('giden', 'giden')],
                                  default='gelen',
                                  max_length=5)),
                ('mesaj_metni', models.TextField(default='')),
                ('tarih', models.DateTimeField(auto_now_add=True)),
                ('okundu', models.BooleanField(default=False)),
                ('ilan',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app.ilan')),
            ],
        ),
        migrations.CreateModel(
            name='mahalle',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('adi', models.CharField(max_length=50)),
                ('ilcee',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app.ilce')),
            ],
        ),
        migrations.CreateModel(
            name='KayitBekleyenler',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('email',
                 models.EmailField(max_length=254,
                                   unique=True,
                                   verbose_name='Kurum e-posta adresi')),
                ('kurum',
                 models.CharField(max_length=100,
                                  null=True,
                                  verbose_name='Kurum adı')),
                ('kurum_adres',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='Kurum adresi')),
                ('kurum_telefon',
                 models.CharField(
                     max_length=17,
                     null=True,
                     validators=[
                         django.core.validators.RegexValidator(
                             message=
                             "Telefon numarası şu şeklillerden biri gibi olmalı: '+9999999999' veya '9999999999' veya '999 9999999' veya '999 999 9999' veya '999 999 99 99'. ",
                             regex=
                             '^\\+?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{2} ?[0-9]{2}$'
                         )
                     ],
                     verbose_name='Kurum telefonu')),
                ('kurum_web_adres',
                 models.URLField(blank=True,
                                 null=True,
                                 verbose_name='Kurum web adresi')),
                ('kurum_il',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   to='app.il')),
                ('kurum_ilce',
                 smart_selects.db_fields.ChainedForeignKey(
                     chained_field='kurum_il',
                     chained_model_field='ill',
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to='app.ilce')),
            ],
        ),
        migrations.CreateModel(
            name='Kategori',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('ad',
                 models.CharField(max_length=20, verbose_name='Kategori adı')),
                ('ust_kategori',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='app.Kategori')),
            ],
            options={
                'ordering': ('ust_kategori__ad', 'ad'),
            },
        ),
        migrations.AddField(
            model_name='ilan',
            name='kategori',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='app.Kategori'),
        ),
        migrations.AddField(
            model_name='ilan',
            name='sahip',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='favoriler',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('ilan',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app.ilan')),
                ('sahip',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='user',
            name='kurum_il',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='app.il'),
        ),
        migrations.AddField(
            model_name='user',
            name='kurum_ilce',
            field=smart_selects.db_fields.ChainedForeignKey(
                auto_choose=True,
                chained_field='kurum_il',
                chained_model_field='ill',
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                sort=False,
                to='app.ilce'),
        ),
        migrations.AddField(
            model_name='user',
            name='kurum_mahalle',
            field=smart_selects.db_fields.ChainedForeignKey(
                auto_choose=True,
                chained_field='kurum_ilce',
                chained_model_field='ilcee',
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                sort=False,
                to='app.mahalle'),
        ),
        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'),
        ),
    ]
コード例 #30
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(upload_to=app.models.avatar_upload_to,
                                   verbose_name='Аватар')),
                ('count',
                 models.IntegerField(
                     default=0,
                     verbose_name='Количество вопросов и ответов у пользователя'
                 )),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL,
                     verbose_name='Пользователь')),
            ],
            options={
                'verbose_name': 'Пользователь',
                'verbose_name_plural': 'Пользователи',
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50,
                                  unique=True,
                                  verbose_name='Имя')),
                ('count',
                 models.IntegerField(
                     default=0, verbose_name='Количество вопросов по тегу')),
            ],
            options={
                'verbose_name': 'Тег',
                'verbose_name_plural': 'Теги',
            },
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(max_length=128, verbose_name='Заголовок')),
                ('date',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='Дата создания')),
                ('text', models.TextField(verbose_name='Текст')),
                ('rating',
                 models.IntegerField(default=0, verbose_name='Рейтинг')),
                ('author',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app.profile',
                                   verbose_name='Автор')),
                ('tags',
                 models.ManyToManyField(blank=True,
                                        to='app.Tag',
                                        verbose_name='Теги')),
            ],
            options={
                'verbose_name': 'Вопрос',
                'verbose_name_plural': 'Вопросы',
            },
        ),
        migrations.CreateModel(
            name='Answer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='Дата создания')),
                ('text', models.TextField(verbose_name='Текст')),
                ('is_correct',
                 models.BooleanField(default=False,
                                     verbose_name='Корректность ответа')),
                ('rating',
                 models.IntegerField(default=0, verbose_name='Рейтинг')),
                ('author',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app.profile',
                                   verbose_name='Автор')),
                ('question',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app.question',
                                   verbose_name='Вопрос')),
            ],
            options={
                'verbose_name': 'Ответ',
                'verbose_name_plural': 'Ответы',
            },
        ),
    ]