|
|
@ -757,6 +757,12 @@ class Novinky(models.Model): |
|
|
|
text = models.TextField('Text novinky', blank=True, null=True) |
|
|
|
obrazek = models.ImageField('Obrázek', upload_to='image_novinky/%Y/%m/%d/', |
|
|
|
null=True, blank=True) |
|
|
|
obrazek_maly = ImageSpecField(source='obrazek', |
|
|
|
processors=[ |
|
|
|
ResizeToFit(350, 200, upscale=False) |
|
|
|
], |
|
|
|
options={'quality': 95}) |
|
|
|
|
|
|
|
autor = models.ForeignKey(settings.AUTH_USER_MODEL, |
|
|
|
verbose_name='Autor novinky') |
|
|
|
zverejneno = models.BooleanField('Zveřejněno', default="False") |
|
|
|