X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/e17ba704033aba068a935c1beb42d1f306e6a114..50aec69a46276ec94d7d4d2ab3c59bc383d07a2c:/src/push/models.py?ds=inline diff --git a/src/push/models.py b/src/push/models.py index 79e555173..461845e77 100644 --- a/src/push/models.py +++ b/src/push/models.py @@ -1,20 +1,18 @@ -# -*- coding: utf-8 -*- -# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. -# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Wolne Lektury. See NOTICE for more information. # from django.db import models -from django.utils.translation import ugettext_lazy as _ class Notification(models.Model): timestamp = models.DateTimeField(auto_now_add=True) - title = models.CharField(max_length=256, verbose_name=_(u'title')) - body = models.CharField(max_length=2048, verbose_name=_(u'content')) - image = models.ImageField(verbose_name=_(u'image'), blank=True, upload_to='push/img') + title = models.CharField(max_length=256, verbose_name='tytuł') + body = models.CharField(max_length=2048, verbose_name='treść') + image = models.ImageField(verbose_name='obraz', blank=True, upload_to='push/img') message_id = models.CharField(max_length=2048) class Meta: ordering = ['-timestamp'] - def __unicode__(self): + def __str__(self): return '%s: %s' % (self.timestamp, self.title)