X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/08e687e53ba84afd39646185142e59c6bfe77783..9c2555ad140dca1c09cde628bd22aac811e05b7e:/src/social/models.py diff --git a/src/social/models.py b/src/social/models.py index b254b22dc..e85298803 100644 --- a/src/social/models.py +++ b/src/social/models.py @@ -125,6 +125,7 @@ class Cite(models.Model): class Carousel(models.Model): placement = models.SlugField(_('placement'), choices=[ ('main', 'main'), + ('main_2022', 'main 2022'), ]) priority = models.SmallIntegerField(_('priority'), default=0) language = models.CharField(_('language'), max_length=2, blank=True, default='', choices=settings.LANGUAGES) @@ -146,14 +147,13 @@ class Carousel(models.Model): class CarouselItem(models.Model): - order = models.PositiveSmallIntegerField(_('order'), unique=True) + order = models.PositiveSmallIntegerField(_('order')) carousel = models.ForeignKey(Carousel, models.CASCADE, verbose_name=_('carousel')) banner = models.ForeignKey(Cite, models.CASCADE, null=True, blank=True, verbose_name=_('banner')) banner_group = models.ForeignKey(BannerGroup, models.CASCADE, null=True, blank=True, verbose_name=_('banner group')) class Meta: ordering = ('order',) - unique_together = [('carousel', 'order')] verbose_name = _('carousel item') verbose_name_plural = _('carousel items')