class Migration(migrations.Migration):

    dependencies = [
        ('advert', '0006_auto_20210324_1429'),
    ]

    operations = [
        migrations.AddField(
            model_name='advert',
            name='statustype',
            field=models.CharField(choices=[('0', 'همه نوع'), ('1', 'ویلایی'),
                                            ('2', 'آپارتمانی'), ('3', 'زمین'),
                                            ('4', 'سایر موارد')],
                                   default='0',
                                   max_length=1,
                                   verbose_name='نوع ملک'),
        ),
        migrations.AlterField(
            model_name='advert',
            name='house_type',
            field=models.CharField(choices=[('0', 'همه نوع'), ('1', 'ویلایی'),
                                            ('2', 'آپارتمانی'), ('3', 'زمین'),
                                            ('4', 'سایر موارد')],
                                   default='0',
                                   max_length=1,
                                   verbose_name='نوع خانه'),
        ),
        migrations.AlterField(
            model_name='advert',
            name='poster',
            field=models.ImageField(default='image_default\\default.jpg',
                                    upload_to=advert.models.change_file_name,
                                    verbose_name='پستر'),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('advert', '0005_auto_20210214_2037'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='advert',
            name='is_privet',
        ),
        migrations.AddField(
            model_name='advert',
            name='address',
            field=models.TextField(blank=True, null=True, verbose_name='ادرس'),
        ),
        migrations.AlterField(
            model_name='advert',
            name='category',
            field=models.CharField(choices=[('0', 'همه نوع قرار داد'), ('2', 'فروش'), ('3', 'رهن'), ('4', 'اجاره')], default='0', max_length=1, verbose_name='وضعیت اگهی'),
        ),
        migrations.AlterField(
            model_name='advert',
            name='house_type',
            field=models.CharField(choices=[('0', 'همه نوع'), ('1', 'ویلایی'), ('2', 'آپارتمانی'), ('3', 'زمین'), ('4', 'سایر موارد')], default='0', max_length=1, verbose_name='وضعیت اگهی'),
        ),
        migrations.AlterField(
            model_name='advert',
            name='poster',
            field=models.ImageField(default='image_default\\default.jpg', upload_to=advert.models.change_file_name, verbose_name='پستر'),
        ),
    ]
Esempio n. 3
0
class Migration(migrations.Migration):

    dependencies = [
        ('advert', '0008_auto_20210324_1457'),
    ]

    operations = [
        migrations.AlterField(
            model_name='advert',
            name='baths',
            field=models.CharField(choices=[('0', 'هر تعداد'), ('1', '1-2'), ('2', '3-4'), ('3', '5-6')], default='1', max_length=1, verbose_name='حمام'),
        ),
        migrations.AlterField(
            model_name='advert',
            name='beds',
            field=models.CharField(choices=[('0', 'هر تعداد'), ('1', '1-2'), ('2', '3-4'), ('3', '5-6')], default='1', max_length=1, verbose_name='اتاق خواب'),
        ),
        migrations.AlterField(
            model_name='advert',
            name='poster',
            field=models.ImageField(default='image_default\\default.jpg', upload_to=advert.models.change_file_name, verbose_name='پستر'),
        ),
        migrations.AlterField(
            model_name='advert',
            name='wc',
            field=models.CharField(choices=[('0', 'هر تعداد'), ('1', '1-2'), ('2', '3-4'), ('3', '5-6')], default='1', max_length=1, verbose_name='سرویس بهداشتی'),
        ),
    ]
Esempio n. 4
0
class Migration(migrations.Migration):

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

    operations = [
        migrations.AlterField(
            model_name='advert',
            name='poster',
            field=models.ImageField(default='image_default\\default.jpg', upload_to=advert.models.change_file_name, verbose_name='پستر'),
        ),
        migrations.CreateModel(
            name='AdvertView',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('user_ip', models.CharField(blank=True, max_length=150, null=True, verbose_name='ip کاربر')),
                ('view', models.IntegerField(blank=True, default=0, null=True, verbose_name='تعداد بازدید')),
                ('advert', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='advertview', to='advert.Advert', verbose_name='آگهی')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('advert', '0013_auto_20210325_1321'),
    ]

    operations = [
        migrations.AlterField(
            model_name='advert',
            name='category',
            field=models.CharField(choices=[('1', 'فروش'), ('2', 'رهن'), ('3', 'اجاره')], default='0', max_length=1, verbose_name='وضعیت اگهی'),
        ),
        migrations.AlterField(
            model_name='advert',
            name='poster',
            field=models.ImageField(default='image_default\\default.jpg', upload_to=advert.models.change_file_name, verbose_name='پستر'),
        ),
        migrations.AlterField(
            model_name='advert',
            name='price',
            field=models.IntegerField(blank=True, null=True, verbose_name='قیمت'),
        ),
    ]
Esempio n. 6
0
class Migration(migrations.Migration):

    dependencies = [
        ('advert', '0003_auto_20210213_1218'),
    ]

    operations = [
        migrations.CreateModel(
            name='Option',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(max_length=150,
                                  unique=True,
                                  verbose_name='عنوان')),
            ],
        ),
        migrations.AlterField(
            model_name='advert',
            name='poster',
            field=models.ImageField(default='image_default\\default.jpg',
                                    upload_to=advert.models.change_file_name,
                                    verbose_name='پستر'),
        ),
        migrations.AddField(
            model_name='advert',
            name='options',
            field=models.ManyToManyField(blank=True,
                                         null=True,
                                         related_name='advert_option',
                                         to='advert.Option'),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('advert', '0007_auto_20210324_1456'),
    ]

    operations = [
        migrations.AlterField(
            model_name='advert',
            name='poster',
            field=models.ImageField(default='image_default\\default.jpg',
                                    upload_to=advert.models.change_file_name,
                                    verbose_name='پستر'),
        ),
        migrations.AlterField(
            model_name='advert',
            name='statustype',
            field=models.CharField(choices=[('0', 'همه دسته بندی ها'),
                                            ('1', 'تجاری'), ('2', 'مسکونی')],
                                   default='0',
                                   max_length=1,
                                   verbose_name='نوع ملک'),
        ),
    ]
Esempio n. 8
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Advert',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('Uid',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  unique=True)),
                ('title', models.CharField(max_length=50,
                                           verbose_name='عنوان')),
                ('slug',
                 autoslug.fields.AutoSlugField(editable=False,
                                               populate_from='title')),
                ('poster',
                 models.ImageField(default='image_default\\default.jpg',
                                   upload_to=advert.models.change_file_name,
                                   verbose_name='پستر')),
                ('detail',
                 models.CharField(max_length=80, verbose_name='جزئیات')),
                ('price',
                 models.CharField(blank=True,
                                  max_length=50,
                                  null=True,
                                  verbose_name='قیمت')),
                ('area', models.CharField(max_length=150,
                                          verbose_name='متراژ')),
                ('stat', models.CharField(max_length=150,
                                          verbose_name='منطقه')),
                ('beds', models.IntegerField(verbose_name='اتاق خواب')),
                ('baths', models.IntegerField(verbose_name='حمام')),
                ('wc', models.IntegerField(verbose_name='سرویس بهداشتی')),
                ('garages',
                 models.BooleanField(default=True, verbose_name='پارکینگ')),
                ('house_type',
                 models.CharField(choices=[('V', 'ویلایی'), ('A', 'آپارتمانی'),
                                           ('O', 'سایر موارد')],
                                  default='O',
                                  max_length=1,
                                  verbose_name='وضعیت اگهی')),
                ('category',
                 models.CharField(choices=[('B', 'خرید'), ('S', 'فروش'),
                                           ('R', 'رهن'), ('A', 'اجاره')],
                                  default='S',
                                  max_length=1,
                                  verbose_name='وضعیت اگهی')),
                ('description',
                 models.TextField(max_length=500, verbose_name='توضیحات')),
                ('is_public',
                 models.BooleanField(default=False, verbose_name='عمومی')),
                ('is_privet',
                 models.BooleanField(default=False, verbose_name='خصوصی')),
                ('year_created', models.IntegerField(verbose_name='سال ساخت')),
                ('created_at',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='زمان ساخت')),
                ('updated_at',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='زمان اپدیت')),
                ('is_active',
                 models.BooleanField(default=True,
                                     verbose_name='فعال/غیر فعال')),
                ('url',
                 models.URLField(blank=True,
                                 null=True,
                                 verbose_name='ادرس ویدیو')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='user_advert',
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='کاربر')),
            ],
        ),
        migrations.CreateModel(
            name='GalleryImage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(default='image_default\\default.jpg',
                                   upload_to=advert.models.change_file_name,
                                   verbose_name='عکس')),
                ('advert',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='gallery',
                                   to='advert.Advert')),
            ],
        ),
    ]
Esempio n. 9
0
class Migration(migrations.Migration):

    dependencies = [
        ('advert', '0011_auto_20210324_1619'),
    ]

    operations = [
        migrations.AlterField(
            model_name='advert',
            name='baths',
            field=models.CharField(choices=[('1', '1-2'), ('2', '3-4'),
                                            ('3', '5-6')],
                                   default='1',
                                   max_length=1,
                                   verbose_name='حمام'),
        ),
        migrations.AlterField(
            model_name='advert',
            name='beds',
            field=models.CharField(choices=[('1', '1-2'), ('2', '3-4'),
                                            ('3', '5-6')],
                                   default='1',
                                   max_length=1,
                                   verbose_name='اتاق خواب'),
        ),
        migrations.AlterField(
            model_name='advert',
            name='category',
            field=models.CharField(choices=[('2', 'فروش'), ('3', 'رهن'),
                                            ('4', 'اجاره')],
                                   default='0',
                                   max_length=1,
                                   verbose_name='وضعیت اگهی'),
        ),
        migrations.AlterField(
            model_name='advert',
            name='house_type',
            field=models.CharField(choices=[('1', 'ویلایی'),
                                            ('2', 'آپارتمانی'), ('3', 'زمین'),
                                            ('4', 'سایر موارد')],
                                   default='0',
                                   max_length=1,
                                   verbose_name='نوع خانه'),
        ),
        migrations.AlterField(
            model_name='advert',
            name='poster',
            field=models.ImageField(default='image_default\\default.jpg',
                                    upload_to=advert.models.change_file_name,
                                    verbose_name='پستر'),
        ),
        migrations.AlterField(
            model_name='advert',
            name='statustype',
            field=models.CharField(choices=[('1', 'تجاری'), ('2', 'مسکونی')],
                                   default='0',
                                   max_length=1,
                                   verbose_name='نوع ملک'),
        ),
        migrations.AlterField(
            model_name='advert',
            name='wc',
            field=models.CharField(choices=[('1', '1-2'), ('2', '3-4'),
                                            ('3', '5-6')],
                                   default='1',
                                   max_length=1,
                                   verbose_name='سرویس بهداشتی'),
        ),
    ]