| Index: globals/has_string.py |
| =================================================================== |
| new file mode 100644 |
| --- /dev/null |
| +++ b/globals/has_string.py |
| @@ -0,0 +1,9 @@ |
| +from jinja2 import contextfunction |
| + |
| +@contextfunction |
| +def has_string(context, name, page=None): |
| + try: |
| + if context['get_string'](name, page): |
| + return True |
| + except KeyError, RuntimeError: |
| + return False |