iwla

iwla Commit Details

Date:2015-04-06 17:55:11 (6 years 3 months ago)
Author:Grégory Soutadé
Branch:dev, master
Commit:651a7b95669e6ba8244abf6d42e7fc021d980dd1
Parents: ee184f86b5afda1a0258c7311108c8d9eaa01f51
Message:Add display/top_downloads_diff plugin

Changes:
Cplugins/display/referers_diff.py → plugins/display/top_downloads_diff.py

File differences

plugins/display/top_downloads_diff.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# -*- coding: utf-8 -*-
#
# Copyright Grégory Soutadé 2015
# This file is part of iwla
# iwla is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# iwla is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with iwla. If not, see <http://www.gnu.org/licenses/>.
#
from iwla import IWLA
from istats_diff import IWLADisplayStatsDiff
from display import *
"""
Display hook
Enlight new and updated downloads in in top_downloads.html
Plugin requirements :
display/top_downloads
Conf values needed :
None
Output files :
None
Statistics creation :
None
Statistics update :
None
Statistics deletion :
None
"""
class IWLADisplayTopDownloadsDiff(IWLADisplayStatsDiff):
def __init__(self, iwla):
super(IWLADisplayTopDownloadsDiff, self).__init__(iwla)
self.API_VERSION = 1
self.requires = ['IWLADisplayTopDownloads']
self.month_stats_key = u'top_downloads'
self.filename = u'top_downloads.html'
self.block_name = self.iwla._(u'All Downloads')
def load(self):
if not self.iwla.getConfValue('create_all_downloads_page', True):
return False
return super(IWLADisplayTopDownloadsDiff, self).load()

Archive Download the corresponding diff file

Branches

Tags