Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: globals/has_string.py

Issue 29424810: Issue 5191 - Add Terms of Use to adblockplus.org homepage (Closed) Base URL: https://hg.adblockplus.org/web.adblockplus.org
Patch Set: Removed fr/index.json Created May 2, 2017, 10:23 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | globals/platforms.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 from jinja2 import contextfunction
2
3 @contextfunction
4 def has_string(context, name, page=None):
5 try:
6 if context['get_string'](name, page):
7 return True
8 except KeyError, RuntimeError:
9 return False
OLDNEW
« no previous file with comments | « no previous file | globals/platforms.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld