X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/5913c54d19b8f6775633176032161d49f9b2f1aa..ca8dd597fad53663b91ed3f962d8c4f44cd8dfe9:/src/catalogue/models/publish_log.py diff --git a/src/catalogue/models/publish_log.py b/src/catalogue/models/publish_log.py old mode 100755 new mode 100644 index 7a8e2f9e..eeec055e --- a/src/catalogue/models/publish_log.py +++ b/src/catalogue/models/publish_log.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # @@ -14,9 +12,9 @@ class BookPublishRecord(models.Model): A record left after publishing a Book. """ - book = models.ForeignKey('Book', verbose_name=_('book'), related_name='publish_log') + book = models.ForeignKey('Book', models.CASCADE, verbose_name=_('book'), related_name='publish_log') timestamp = models.DateTimeField(_('time'), auto_now_add=True) - user = models.ForeignKey(User, verbose_name=_('user')) + user = models.ForeignKey(User, models.CASCADE, verbose_name=_('user')) class Meta: app_label = 'catalogue' @@ -30,8 +28,8 @@ class ChunkPublishRecord(models.Model): BookPublishRecord details for each Chunk. """ - book_record = models.ForeignKey(BookPublishRecord, verbose_name=_('book publish record')) - change = models.ForeignKey(Chunk.change_model, related_name='publish_log', verbose_name=_('change')) + book_record = models.ForeignKey(BookPublishRecord, models.CASCADE, verbose_name=_('book publish record')) + change = models.ForeignKey(Chunk.change_model, models.CASCADE, related_name='publish_log', verbose_name=_('change')) class Meta: app_label = 'catalogue' @@ -42,10 +40,10 @@ class ChunkPublishRecord(models.Model): class ImagePublishRecord(models.Model): """A record left after publishing an Image.""" - image = models.ForeignKey(Image, verbose_name=_('image'), related_name='publish_log') + image = models.ForeignKey(Image, models.CASCADE, verbose_name=_('image'), related_name='publish_log') timestamp = models.DateTimeField(_('time'), auto_now_add=True) - user = models.ForeignKey(User, verbose_name=_('user')) - change = models.ForeignKey(Image.change_model, related_name='publish_log', verbose_name=_('change')) + user = models.ForeignKey(User, models.CASCADE, verbose_name=_('user')) + change = models.ForeignKey(Image.change_model, models.CASCADE, related_name='publish_log', verbose_name=_('change')) class Meta: app_label = 'catalogue'