##// END OF EJS Templates
Moderator can see poster IPs in the post view
neko259 -
r1638:7cce701c default
parent child Browse files
Show More
@@ -1,6 +1,7 b''
1 import uuid
1 import uuid
2 import hashlib
3 import re
2
4
3 import re
4 from boards import settings
5 from boards import settings
5 from boards.abstracts.tripcode import Tripcode
6 from boards.abstracts.tripcode import Tripcode
6 from boards.models import Attachment, KeyPair, GlobalId
7 from boards.models import Attachment, KeyPair, GlobalId
@@ -400,3 +401,6 b' class Post(models.Model, Viewable):'
400
401
401 def get_tags(self):
402 def get_tags(self):
402 return self.get_thread().get_tags()
403 return self.get_thread().get_tags()
404
405 def get_ip_color(self):
406 return hashlib.md5(self.poster_ip.encode()).hexdigest()[:6]
@@ -7,7 +7,11 b''
7 <div class="post-info">
7 <div class="post-info">
8 <a class="post_id" href="{{ post.get_absolute_url }}">#{{ post.id }}</a>
8 <a class="post_id" href="{{ post.get_absolute_url }}">#{{ post.id }}</a>
9 <span class="title">{{ post.title }}</span>
9 <span class="title">{{ post.title }}</span>
10 <span class="pub_time"><time datetime="{{ post.pub_time|date:'c' }}">{{ post.pub_time }}</time></span>
10 <span class="pub_time"
11 {% if perms.boards.change_post %}
12 style="border-bottom: solid 2px #{{ post.get_ip_color }};" title="{{ post.poster_ip }}"
13 {% endif %}
14 ><time datetime="{{ post.pub_time|date:'c' }}">{{ post.pub_time }}</time></span>
11 {% if post.tripcode %}
15 {% if post.tripcode %}
12 /
16 /
13 {% with tripcode=post.get_tripcode %}
17 {% with tripcode=post.get_tripcode %}
General Comments 0
You need to be logged in to leave comments. Login now