X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/ae60b2a3949e96357477cc04f90fd0873cee8a92..a169ba7caa0d9d83fddcbad5ed05f536e0ca1b9e:/src/pdcounter/models.py diff --git a/src/pdcounter/models.py b/src/pdcounter/models.py index 69c70c1c0..4454e5af0 100644 --- a/src/pdcounter/models.py +++ b/src/pdcounter/models.py @@ -28,7 +28,7 @@ class Author(models.Model): def category(self): return "author" - def __unicode__(self): + def __str__(self): return self.name def __repr__(self): @@ -36,7 +36,7 @@ class Author(models.Model): @permalink def get_absolute_url(self): - return 'catalogue.views.tagged_object_list', [self.url_chunk] + return 'tagged_object_list', [self.url_chunk] def has_description(self): return len(self.description) > 0 @@ -71,12 +71,12 @@ class BookStub(models.Model): verbose_name = _('book stub') verbose_name_plural = _('book stubs') - def __unicode__(self): + def __str__(self): return self.title @permalink def get_absolute_url(self): - return 'catalogue.views.book_detail', [self.slug] + return 'book_detail', [self.slug] def in_pd(self): return self.pd is not None and self.pd <= datetime.now().year