X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/75957f735219259d3b4bc361f80ccd3d7b92a0e9..33af401eb4abe15a37d0147807d06a9b19eaa802:/src/catalogue/models/tag.py?ds=sidebyside diff --git a/src/catalogue/models/tag.py b/src/catalogue/models/tag.py index db7267e1b..3c2a53610 100644 --- a/src/catalogue/models/tag.py +++ b/src/catalogue/models/tag.py @@ -43,9 +43,9 @@ class TagRelation(models.Model): def __str__(self): try: - return u'%s [%s]' % (self.content_type.get_object_for_this_type(pk=self.object_id), self.tag) + return '%s [%s]' % (self.content_type.get_object_for_this_type(pk=self.object_id), self.tag) except ObjectDoesNotExist: - return u' [%s]' % self.tag + return ' [%s]' % self.tag class Tag(models.Model): @@ -67,6 +67,8 @@ class Tag(models.Model): gazeta_link = models.CharField(blank=True, max_length=240) culturepl_link = models.CharField(blank=True, max_length=240) wiki_link = models.CharField(blank=True, max_length=240) + photo = models.FileField(blank=True, null=True, upload_to='catalogue/tag/') + photo_attribution = models.CharField(max_length=255, blank=True) created_at = models.DateTimeField(_('creation date'), auto_now_add=True, db_index=True) changed_at = models.DateTimeField(_('creation date'), auto_now=True, db_index=True)