1 # This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
4 from django.db import models
5 from django.urls import reverse
8 class InfoPage(models.Model):
9 """An InfoPage is used to display a two-column flatpage."""
11 slug = models.SlugField('slug', max_length=120, unique=True, db_index=True)
12 title = models.CharField('tytuł', max_length=120, blank=True)
13 published = models.BooleanField(
15 help_text='Nieopublikowane strony są widoczne tylko dla administratorów.'
17 findable = models.BooleanField('wyszukiwalna')
18 left_column = models.TextField('lewa kolumna', blank=True)
19 right_column = models.TextField('prawa kolumna', blank=True)
22 verbose_name = 'strona informacyjna'
23 verbose_name_plural = 'strony informacyjne'
28 def get_absolute_url(self):
29 return reverse('infopage', args=[self.slug])