| 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): |
|
juliandoucette
2017/04/28 21:56:01
Too bad get_string throws an exception :/
If we c
Jon Sonesen
2017/04/29 08:30:55
The thing is that we have it raise the exception s
juliandoucette
2017/05/02 08:39:17
Ack.
juliandoucette
2017/05/02 08:45:45
Done.
|
| + try: |
| + if get_string(name, page): |
| + return True |
| + except: |
| + return False |