diff --git a/contrib/frontends/django/nntpchan/nntpchan/frontend/models.py b/contrib/frontends/django/nntpchan/nntpchan/frontend/models.py index 0597a0f..29b9759 100644 --- a/contrib/frontends/django/nntpchan/nntpchan/frontend/models.py +++ b/contrib/frontends/django/nntpchan/nntpchan/frontend/models.py @@ -18,7 +18,7 @@ class Attachment(models.Model): def path(self): ext = self.filename.split('.')[-1] - return '{}{}'.format(self.filehash, ext) + return '{}.{}'.format(self.filehash, ext) def thumb(self): return '/media/thumb-{}.jpg'.format(self.path()) @@ -66,7 +66,7 @@ class Post(models.Model): rpls = self.get_all_replies() l = len(rpls) if l > truncate: - rpls = rpls[(l+1)-truncate:l-1] + rpls = rpls[l-truncate:] return rpls def is_op(self): diff --git a/contrib/frontends/django/nntpchan/nntpchan/templates/frontend/board.html b/contrib/frontends/django/nntpchan/nntpchan/templates/frontend/board.html index 7cd6937..b45fc8e 100644 --- a/contrib/frontends/django/nntpchan/nntpchan/templates/frontend/board.html +++ b/contrib/frontends/django/nntpchan/nntpchan/templates/frontend/board.html @@ -16,7 +16,7 @@
{{op.message|memepost}}@@ -31,7 +31,7 @@
{{reply.message|memepost}}diff --git a/contrib/frontends/django/nntpchan/nntpchan/templates/frontend/thread.html b/contrib/frontends/django/nntpchan/nntpchan/templates/frontend/thread.html index c7f1939..8e28f92 100644 --- a/contrib/frontends/django/nntpchan/nntpchan/templates/frontend/thread.html +++ b/contrib/frontends/django/nntpchan/nntpchan/templates/frontend/thread.html @@ -13,7 +13,7 @@
{{op.message|memepost}}@@ -28,7 +28,7 @@ {% autoescape off %}