class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Department',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=45, unique=True)),
                ('chairman', models.CharField(max_length=45, unique=True)),
                ('detail', models.TextField()),
                ('detail_html', models.TextField(editable=False)),
                ('department_slug',
                 models.SlugField(allow_unicode=True, unique=True)),
                ('acronyms', models.CharField(max_length=10)),
                ('established_date', models.DateTimeField()),
                ('faculty',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='departments',
                                   to='faculty.Faculty',
                                   unique=True)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='DepartmentImages',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(
                     upload_to=departments.models.get_image_filename,
                     verbose_name='department_image')),
                ('department',
                 models.ForeignKey(default=None,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='department_images',
                                   to='departments.Department')),
            ],
        ),
    ]
Exemple #2
0
class Migration(migrations.Migration):

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

    operations = [
        migrations.AlterField(
            model_name='department',
            name='image',
            field=models.ImageField(blank=True,
                                    upload_to=departments.models.image_folder,
                                    verbose_name='Картинка отдела'),
        ),
    ]
Exemple #3
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Department',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(max_length=200,
                                  verbose_name='Название отдела')),
                ('short_title',
                 models.CharField(max_length=6,
                                  null=True,
                                  verbose_name='Короткое название')),
                ('slug',
                 models.SlugField(unique=True,
                                  verbose_name='Ссылка на отдел')),
                ('image',
                 models.ImageField(blank=True,
                                   upload_to=departments.models.image_folder,
                                   verbose_name='Картинка отдела')),
                ('text',
                 models.TextField(blank=True, verbose_name='Услуги отдела')),
                ('science',
                 models.TextField(blank=True,
                                  verbose_name='Научная деятельность')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=200,
                                   verbose_name='Email')),
                ('phone',
                 models.CharField(max_length=50, verbose_name='Телефон')),
                ('head_of_department',
                 models.CharField(max_length=200,
                                  verbose_name='Начальник отдела')),
            ],
            options={
                'verbose_name': 'Отдел',
                'verbose_name_plural': 'Отделы',
            },
        ),
        migrations.CreateModel(
            name='Management',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('full_name',
                 models.CharField(max_length=200, verbose_name='Полное имя')),
                ('slug', models.SlugField(unique=True, verbose_name='Ссылка')),
                ('image',
                 models.ImageField(upload_to=departments.models.image_folder)),
                ('position',
                 models.CharField(max_length=200,
                                  verbose_name='Занимаемая должность')),
                ('text',
                 models.TextField(blank=True, verbose_name='д.т.н. и т.д.')),
                ('biografy',
                 models.TextField(blank=True, verbose_name='Биография')),
            ],
            options={
                'verbose_name': 'Руководство',
                'verbose_name_plural': 'Руководство',
            },
        ),
    ]