|
|
@@ -16,6 +16,7 @@ from graphos.sources.model import ModelDataSource
|
|
16
|
16
|
import random
|
|
17
|
17
|
import math
|
|
18
|
18
|
import copy
|
|
|
19
|
+import functools
|
|
19
|
20
|
from django.utils import timezone
|
|
20
|
21
|
|
|
21
|
22
|
# JSS above this limit will not be displayed on the home page col graph
|
|
|
@@ -54,7 +55,9 @@ def home(request):
|
|
54
|
55
|
likesMe = Like.objects.filter(
|
|
55
|
56
|
reset=myCounter.lastReset)
|
|
56
|
57
|
myCounter.likeCount = likesMe.count()
|
|
57
|
|
- myCounter.likers = [like.liker for like in likesMe]
|
|
|
58
|
+ myCounter.likersString = functools.reduce(
|
|
|
59
|
+ lambda a,b: a + ", " + b,
|
|
|
60
|
+ [like.liker.trigramme for like in likesMe])
|
|
58
|
61
|
myCounter.lastReset.formatted_delta = format_timedelta(
|
|
59
|
62
|
myCounter.lastReset.delta, locale='fr', threshold=1)
|
|
60
|
63
|
except Counter.DoesNotExist:
|