Show More
@@ -1,6 +1,7 b'' | |||
|
1 | 1 | import uuid |
|
2 | import hashlib | |
|
3 | import re | |
|
2 | 4 | |
|
3 | import re | |
|
4 | 5 | from boards import settings |
|
5 | 6 | from boards.abstracts.tripcode import Tripcode |
|
6 | 7 | from boards.models import Attachment, KeyPair, GlobalId |
@@ -400,3 +401,6 b' class Post(models.Model, Viewable):' | |||
|
400 | 401 | |
|
401 | 402 | def get_tags(self): |
|
402 | 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 | 7 | <div class="post-info"> |
|
8 | 8 | <a class="post_id" href="{{ post.get_absolute_url }}">#{{ post.id }}</a> |
|
9 | 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 | 15 | {% if post.tripcode %} |
|
12 | 16 | / |
|
13 | 17 | {% with tripcode=post.get_tripcode %} |
General Comments 0
You need to be logged in to leave comments.
Login now