IMG_ROOTDIR paramter removed.

fix #530
This commit is contained in:
Antoine Nguyen
2014-03-21 09:18:00 +01:00
parent c2c0a514db
commit d1d53d52f9
3 changed files with 2 additions and 15 deletions
-6
View File
@@ -21,9 +21,3 @@ class ParametersForm(AdminParametersForm):
initial="/tmp/modoboa",
help_text=ugettext_lazy("Path to directory where RRD files are stored")
)
img_rootdir = forms.CharField(
label=ugettext_lazy("Directory to store PNG files"),
initial="/tmp/modoboa",
help_text=ugettext_lazy("Path to directory where PNG files are stored")
)
+2 -1
View File
@@ -3,6 +3,7 @@ import sys
import os
import time
from django.utils.translation import ugettext as _, ugettext_lazy
from django.conf import settings
from modoboa.lib import parameters
periods = [{"name": "day", "label": ugettext_lazy("Day")},
@@ -35,7 +36,7 @@ def str2Time(y, M, d, h="00", m="00", s="00"):
class Grapher(object):
def __init__(self):
self.rrd_rootdir = parameters.get_admin("RRD_ROOTDIR")
self.img_rootdir = parameters.get_admin("IMG_ROOTDIR")
self.img_rootdir = os.path.join(settings.MEDIA_ROOT, "stats")
def process(self, target, suffix, start, end, graph_tpl):
import rrdtool
-8
View File
@@ -39,14 +39,6 @@
"value": "vmail"
}
},
{
"pk": 12,
"model": "lib.parameter",
"fields": {
"name": "stats.IMG_ROOTDIR",
"value": "/srv/www/modoboa/media/stats"
}
},
{
"pk": 13,
"model": "lib.parameter",