cache fix
[wolnelektury.git] / apps / social / models.py
1 # -*- coding: utf-8 -*-
2 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
3 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
4 #
5 from django.db import models
6 from django.utils.translation import ugettext_lazy as _
7
8 from catalogue.models import Book
9
10
11 class Cite(models.Model):
12     book = models.ForeignKey(Book)
13     text = models.TextField(_('text'))
14     vip = models.CharField(_('VIP'), max_length=128, null=True, blank=True)
15     link = models.URLField(_('link'))
16
17     def get_absolute_url(self):
18         return self.link