diff options
Diffstat (limited to '97suifangqa/templatetags')
-rw-r--r-- | 97suifangqa/templatetags/__init__.py | 0 | ||||
-rw-r--r-- | 97suifangqa/templatetags/tools.py | 6 |
2 files changed, 6 insertions, 0 deletions
diff --git a/97suifangqa/templatetags/__init__.py b/97suifangqa/templatetags/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/97suifangqa/templatetags/__init__.py diff --git a/97suifangqa/templatetags/tools.py b/97suifangqa/templatetags/tools.py new file mode 100644 index 0000000..d4d9d0e --- /dev/null +++ b/97suifangqa/templatetags/tools.py @@ -0,0 +1,6 @@ +from django import template
+
+register = template.Library()
+@register.filter
+def get_range(count, start = 0):
+ return range(start, start + count)
\ No newline at end of file |