You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
3.8 KiB
69 lines
3.8 KiB
# -*- coding: utf-8 -*-
|
|
# Generated by Django 1.9.7 on 2016-07-21 15:08
|
|
from __future__ import unicode_literals
|
|
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import django.utils.timezone
|
|
import mptt.fields
|
|
import sorl.thumbnail.fields
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
('common', '0001_initial'),
|
|
('projects', '0001_initial'),
|
|
('specializations', '0001_initial'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Picture',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('file', models.ImageField(upload_to='worksell/pictures')),
|
|
('slug', models.SlugField(blank=True)),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='WorkSell',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('budget', models.DecimalField(blank=True, decimal_places=0, default=0, max_digits=10, null=True)),
|
|
('created', models.DateTimeField(blank=True, default=django.utils.timezone.now, null=True)),
|
|
('currency', models.CharField(blank=True, choices=[('rur', 'RUR'), ('usd', 'USD'), ('eur', 'EUR')], default='rur', max_length=20, null=True)),
|
|
('description', models.TextField(blank=True)),
|
|
('img', sorl.thumbnail.fields.ImageField(blank=True, null=True, upload_to='worksell/worksell')),
|
|
('name', models.CharField(max_length=255)),
|
|
('term', models.IntegerField(blank=True, default=0, null=True)),
|
|
('term_type', models.CharField(blank=True, choices=[('project', 'За проект'), ('hour', 'За час'), ('day', 'За день'), ('month', 'За месяц')], default='hour', max_length=20, null=True)),
|
|
('building_classification', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='worksells', to='projects.BuildingClassfication')),
|
|
('construction_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='worksells', to='projects.ConstructionType')),
|
|
('contractor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='work_sell', to=settings.AUTH_USER_MODEL)),
|
|
('location', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='worksells', to='common.Location')),
|
|
('specialization', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='worksells', to='specializations.Specialization')),
|
|
],
|
|
options={
|
|
'verbose_name': 'Готовая работа',
|
|
'ordering': ['-created'],
|
|
'verbose_name_plural': 'Готовые работы',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='WorkSellPhoto',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('img', sorl.thumbnail.fields.ImageField(upload_to='worksell/worksell')),
|
|
('worksell', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='photos', to='work_sell.WorkSell')),
|
|
],
|
|
options={
|
|
'verbose_name': 'Изображение Готовая работа',
|
|
'verbose_name_plural': 'Изображения Готовые работы',
|
|
},
|
|
),
|
|
]
|
|
|