diff --git a/handlers/statistics/calculation.py b/handlers/statistics/calculation.py index 842033e..3717428 100644 --- a/handlers/statistics/calculation.py +++ b/handlers/statistics/calculation.py @@ -38,6 +38,7 @@ def get_date(time): class AddGameHandler(ServiceRequestHandler): ratings = [] + @staticmethod def check_word(word): if GlobalDictionaryWord.get(word) is None: diff --git a/handlers/statistics/word.py b/handlers/statistics/word.py index 211b794..d209ed7 100644 --- a/handlers/statistics/word.py +++ b/handlers/statistics/word.py @@ -40,5 +40,6 @@ def get(self, *args, **kwargs): rand = q.fetch(limit=10, offset=randint(0, c-10)) self.draw_page('statistics/word_statistic', word=word, word_entity=entity, - top=top, bottom=bottom, rand=rand, danger=danger_top) + top=top if top else [], bottom=bottom if bottom else [], rand=rand if rand else [], + danger=danger_top if danger_top else []) diff --git a/templates/statistics/total_statistic.html b/templates/statistics/total_statistic.html index 646d493..fb8ea72 100644 --- a/templates/statistics/total_statistic.html +++ b/templates/statistics/total_statistic.html @@ -337,10 +337,11 @@

В нашем словаре содержится {{ label(words_in_dictionary, "слово", "слова", "слов") }}. Из них {{ used_words }} когда-либо объяснялось нашими пользователями.

- + {% if longest_time %}

Дольше всего наши пользователи объясняли слово "{{ longest_word }}": {{ time(longest_time) }}

+ {% endif %}