##// END OF EJS Templates
Show platform on the statistics page
neko259 -
r1720:a1292374 default
parent child Browse files
Show More
@@ -14,6 +14,7 b''
14 <p>{% trans 'Size of media:' %} {{ media_size|filesizeformat }}.
14 <p>{% trans 'Size of media:' %} {{ media_size|filesizeformat }}.
15 <p>{% blocktrans count count=post_count %}{{ count }} message{% plural %}messages{% endblocktrans %}.</p>
15 <p>{% blocktrans count count=post_count %}{{ count }} message{% plural %}messages{% endblocktrans %}.</p>
16 <p>{% trans 'Messages per day/week/month:' %} {{ post_per_day }}/{{ post_per_week }}/{{ post_per_month }}</p>
16 <p>{% trans 'Messages per day/week/month:' %} {{ post_per_day }}/{{ post_per_week }}/{{ post_per_month }}</p>
17 <p>{{ platform }}</p>
17 <h2>{% trans 'Authors' %}</h2>
18 <h2>{% trans 'Authors' %}</h2>
18 {% for nick, values in authors.items %}
19 {% for nick, values in authors.items %}
19 <p>
20 <p>
@@ -1,4 +1,5 b''
1 import os
1 import os
2 import platform
2
3
3 from django.shortcuts import render
4 from django.shortcuts import render
4 from django.utils.decorators import method_decorator
5 from django.utils.decorators import method_decorator
@@ -17,6 +18,7 b" PARAM_POST_COUNT = 'post_count'"
17 PARAM_POST_PER_DAY = 'post_per_day'
18 PARAM_POST_PER_DAY = 'post_per_day'
18 PARAM_POST_PER_WEEK = 'post_per_week'
19 PARAM_POST_PER_WEEK = 'post_per_week'
19 PARAM_POST_PER_MONTH = 'post_per_month'
20 PARAM_POST_PER_MONTH = 'post_per_month'
21 PARAM_PLATFORM = 'platform'
20
22
21
23
22 class AuthorsView(BaseBoardView):
24 class AuthorsView(BaseBoardView):
@@ -27,6 +29,8 b' class AuthorsView(BaseBoardView):'
27 params[PARAM_MEDIA_SIZE] = self._get_directory_size(neboard.settings.MEDIA_ROOT)
29 params[PARAM_MEDIA_SIZE] = self._get_directory_size(neboard.settings.MEDIA_ROOT)
28 params[PARAM_POST_COUNT] = Post.objects.count()
30 params[PARAM_POST_COUNT] = Post.objects.count()
29
31
32 params[PARAM_PLATFORM] = platform.platform()
33
30 params[PARAM_POST_PER_DAY] = Post.objects.get_post_per_days(1)
34 params[PARAM_POST_PER_DAY] = Post.objects.get_post_per_days(1)
31 params[PARAM_POST_PER_WEEK] = Post.objects.get_post_per_days(7)
35 params[PARAM_POST_PER_WEEK] = Post.objects.get_post_per_days(7)
32 params[PARAM_POST_PER_MONTH] = Post.objects.get_post_per_days(30)
36 params[PARAM_POST_PER_MONTH] = Post.objects.get_post_per_days(30)
General Comments 0
You need to be logged in to leave comments. Login now