diff --git a/boards/locale/ru/LC_MESSAGES/django.mo b/boards/locale/ru/LC_MESSAGES/django.mo index bedab4fa07d4044073a072249896dd27a417bd73..b24995019561e26b3f8866df81cabd92b1f91888 GIT binary patch literal 9356 zc$~#peQ+JuRliBol*sz9lUlJI*}k^p)Fyc^l9Pb@VkK5=*;b>kNU|YGiMxJpC2joP z?(6P8#p)E0ACfHtGi3$_X7&LyEd>hG!oV=#4$Lt8 zQNDiXoV)L>q^CLq47}0qZ};AF&-Xd^uD*Zw9lxgVb8)rcI`=-MXyD)ORQ&6|OQ}16 z&j4G2$AFIj&jK}Y0eC;~&w=}Zx78{2Q@|&HcLNUt-w%8axCZz!gL&WwfTw^YY65r{ z@de^fy7`O>|XT9LIdZFJ} zFZLa&7dZp52b_+!D)|4zNg`2*nX!0*+IJ%3^N{=m@R1dam##mv9Z zApElpVyD|6e8w6i9f)zmi|W&OoQk@H)Pl1JY*@3%vl2Y?@F5_{84 zqGtxU0l2?O^m*2dXPd;2PLr&E1Gpdf`6lt-cMSdanna(!ZW4L_3d{f>T`T%|YsJ2? zwL<^P20y)4_`bPT^5!kz2Z6t_R_vVzuBEu)wi)=xYemjK8NPR{6I`=S_}slt?7A0t z`8K6?nDIZuB8U8H@FVviSAes?V?+<3zeI5b-Us~04@w^0h2q!_e0aU+HLzadIkH~# zeQCY;?UnUX2j|yIo?izxlYh+mo92C8v-opYv)I+&Eb^>oS@(<0;@>YcOPs&kEPnf8 zv#ATRxFZn9&8)b|^}dni9Q zNZfuO_%QJO8)f`4;0{{1QR=y{QR;UJ_+j9;fGObLZ4`OUn`GUCo5b!XH%T0hZ4$ko z-z0u}ag)UJ3~&(f`n-An`};({f4@)YKGY)d*xw?4A8wKPz`UPt5r6(>i`2_Pi^%^Q%@V(c%`(1uv+!>PeiZV%HjDq>*&=%W)1cW)DZ^V@{a zx3`Jje*+u`{s-_y;Hm9G_rvYtkDJ@Y5C6Gc_&4v6`Q5;SRG&MXyL%=Qf%ly;#%la1#I`@nIA@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hVePXQBzAT|e@X^JP; zAGQ5?EWcW7+xj0$oczC*_}`HCl>}9yH?KH8)K*qxEpKF%31kSR{%VQ;4jVHq{rCcz zTt3T*B>U?s#}rn1hPRl>#7nIGvH|Le)eVH2?+s4!E3(m6Ho)?$72TK(#eq8AJa2Mw zl_L)+=-cB?V-Xf?$OlQOq(tX)&i7#c24=akoGetoRIlRmrTprTpv)l!! z?;ysA5h-E}lOx4q)g9>-0;9#6BGDZGAB3Vk{;!I?KzUs`dz`EOH(_NfgboaVIn*c494W@jWb{n(#QV)#Fs_l(s~lyLdyO1t%=rQPB@Ho0cz4ASsrJ_ZZ?rh5U1q~8J9j#9##(aRs(l!W z-G5e&L&-x01-pie5)LFMea(CVMc?GeUtQKD$jIy5dnC1Z8FnM`m5RQ>htEZpca@uD zd5VI-$ADM|+Cgg!Ewku~M5c1UE1xUBwwg_!Gc9(8cDm27+5=&h?ni_inGb=t%*

+

{% trans 'Statistics' %}

+

{% trans 'Size of media:' %} {{ media_size|filesizeformat }}. +

{% blocktrans count count=post_count %}{{ count }} message{% plural %}messages{% endblocktrans %}.

{% trans 'Authors' %}

{% for nick, values in authors.items %}

diff --git a/boards/views/authors.py b/boards/views/authors.py --- a/boards/views/authors.py +++ b/boards/views/authors.py @@ -1,13 +1,32 @@ +import os + from django.shortcuts import render +import neboard from boards.authors import authors from boards.views.base import BaseBoardView +from boards.models import Post + + +PARAM_AUTHORS = 'authors' +PARAM_MEDIA_SIZE = 'media_size' +PARAM_POST_COUNT = 'post_count' class AuthorsView(BaseBoardView): def get(self, request): params = dict() - params['authors'] = authors + params[PARAM_AUTHORS] = authors + params[PARAM_MEDIA_SIZE] = self._get_directory_size(neboard.settings.MEDIA_ROOT) + params[PARAM_POST_COUNT] = Post.objects.count() return render(request, 'boards/authors.html', params) + + def _get_directory_size(self, directory): + total_size = 0 + for dirpath, dirnames, filenames in os.walk(directory): + for f in filenames: + fp = os.path.join(dirpath, f) + total_size += os.path.getsize(fp) + return total_size