update requirements
[redakcja.git] / apps / catalogue / models / publish_log.py
1 # -*- coding: utf-8 -*-
2 #
3 # This file is part of MIL/PEER, licensed under GNU Affero GPLv3 or later.
4 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
5 #
6 from django.conf import settings
7 from django.db import models
8 from django.utils.translation import ugettext_lazy as _
9 from dvcs.models import Revision
10
11
12 class PublishRecord(models.Model):
13     """A record left after publishing a Document."""
14
15     document = models.ForeignKey('catalogue.Document', verbose_name=_('document'), related_name='publish_log')
16     revision = models.ForeignKey(Revision, verbose_name=_('revision'), related_name='publish_log')
17     timestamp = models.DateTimeField(_('time'), auto_now_add=True)
18     user = models.ForeignKey(settings.AUTH_USER_MODEL, verbose_name=_('user'))
19
20     class Meta:
21         ordering = ['-timestamp']
22         verbose_name = _('book publish record')
23         verbose_name_plural = _('book publish records')