diff --git a/boards/models/post/__init__.py b/boards/models/post/__init__.py --- a/boards/models/post/__init__.py +++ b/boards/models/post/__init__.py @@ -8,7 +8,7 @@ from boards.models import Attachment, Ke from boards.models.attachment import FILE_TYPES_IMAGE from boards.models.base import Viewable from boards.models.post.export import get_exporter, DIFF_TYPE_JSON -from boards.models.post.manager import PostManager +from boards.models.post.manager import PostManager, NO_IP from boards.utils import datetime_to_epoch from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse @@ -403,3 +403,7 @@ class Post(models.Model, Viewable): def get_ip_color(self): return hashlib.md5(self.poster_ip.encode()).hexdigest()[:6] + + def has_ip(self): + return self.poster_ip != NO_IP + diff --git a/boards/templates/boards/post.html b/boards/templates/boards/post.html --- a/boards/templates/boards/post.html +++ b/boards/templates/boards/post.html @@ -7,7 +7,7 @@