X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/d891cd280793404e5d44e0fe0a3d7e0c70564177..4bff37c73cb3e5035954af699a2c52065c993197:/src/social/models.py diff --git a/src/social/models.py b/src/social/models.py index 4c8cd7430..f001e310c 100644 --- a/src/social/models.py +++ b/src/social/models.py @@ -6,7 +6,7 @@ from django.db import models from django.conf import settings from django.core.exceptions import ValidationError from django.urls import reverse -from django.utils.translation import ugettext_lazy as _, get_language +from django.utils.translation import gettext_lazy as _, get_language from catalogue.models import Book from wolnelektury.utils import cached_render, clear_cached_renders @@ -146,14 +146,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')