0.0.18 bg_color for block

This commit is contained in:
SDE
2023-11-28 13:44:52 +03:00
parent 70f204b396
commit f0a45ee53f
10 changed files with 95 additions and 8 deletions

View File

@@ -0,0 +1,19 @@
# Generated by Django 4.2.7 on 2023-11-28 13:39
import colorfield.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('SlidesApp', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='slide',
name='bg_color',
field=colorfield.fields.ColorField(blank=True, default=None, image_field=None, max_length=25, null=True, samples=None, verbose_name='Цвет фона'),
),
]

View File

@@ -21,7 +21,7 @@ class Slide(BaseModel):
picture = models.ImageField(
upload_to='uploads/', verbose_name=_('Фоновое изображение'), null=True, blank=True)
bg_color = ColorField(verbose_name=_('Цвет фона'), default='#FFFFFF')
bg_color = ColorField(verbose_name=_('Цвет фона'), default=None, null=True, blank=True)
but_title = models.CharField(max_length=100, verbose_name=_('Текст на кнопке'), null=True, blank=True)
but_color = ColorField(verbose_name=_('Цвет кнопки'), default='#000000')