calebasse / calebasse / statistics / templatetags / statistics_filters.py @ 1f4ae3b3
1 |
# -*- coding: utf-8 -*-
|
---|---|
2 |
from django import template |
3 |
|
4 |
register = template.Library() |
5 |
|
6 |
@register.filter |
7 |
def is_list(value): |
8 |
return isinstance(value, (list, tuple)) |
9 |
|
10 |
@register.filter |
11 |
def is_dict(value): |
12 |
return isinstance(value, dict) |
- « Précédent
- 1
- 2
- Suivant »