# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
from django.conf import settings
from django.db import models
# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
from django.conf import settings
from django.db import models
title = models.CharField(_('title'), max_length=120, db_index=True)
slug = models.SlugField(_('slug'), max_length=120, primary_key=True)
description = models.TextField(_('description'), null=True, blank=True)
title = models.CharField(_('title'), max_length=120, db_index=True)
slug = models.SlugField(_('slug'), max_length=120, primary_key=True)
description = models.TextField(_('description'), null=True, blank=True)
-
- kind = models.CharField(_('kind'), max_length=10, blank=False, default='book', db_index=True, choices=((('book'), _('book')), (('picture'), ('picture'))))
+ kind = models.CharField(_('kind'), max_length=10, blank=False, default='book', db_index=True,
+ choices=(('book', _('book')), ('picture', _('picture'))))
return models.Q(slug__in=slugs)
def get_books(self):
from catalogue.models import Book
return Book.objects.filter(self.get_query())
return models.Q(slug__in=slugs)
def get_books(self):
from catalogue.models import Book
return Book.objects.filter(self.get_query())