diff --git a/kfet/statistic.py b/kfet/statistic.py index 8ffb7db5..3f32807e 100644 --- a/kfet/statistic.py +++ b/kfet/statistic.py @@ -86,7 +86,10 @@ class Scale(object): def get_labels(self, label_fmt=None): if label_fmt is None: label_fmt = self.label_fmt - return [begin.strftime(label_fmt) for begin, end in self] + return [ + begin.strftime(label_fmt.format(i=i, rev_i=len(self)-i)) + for i, (begin, end) in enumerate(self) + ] def chunkify_qs(self, qs, field=None): if field is None: diff --git a/kfet/templates/kfet/base_form.html b/kfet/templates/kfet/base_form.html index a36be175..9fe79e32 100644 --- a/kfet/templates/kfet/base_form.html +++ b/kfet/templates/kfet/base_form.html @@ -1,3 +1,5 @@ +{% load kfet_tags %} +