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 left_column = models.TextField('lewa kolumna', blank=True)
14 right_column = models.TextField('prawa kolumna', blank=True)
17 verbose_name = 'strona informacyjna'
18 verbose_name_plural = 'strony informacyjne'
23 def get_absolute_url(self):
24 return reverse('infopage', args=[self.slug])