NDOJ/judge/jinja2/camo.py

10 lines
195 B
Python
Raw Permalink Normal View History

2020-01-21 06:35:58 +00:00
from judge.utils.camo import client as camo_client
from . import registry
2022-05-14 17:57:27 +00:00
2020-01-21 06:35:58 +00:00
@registry.filter
def camo(url):
if camo_client is None:
return url
2022-05-14 17:57:27 +00:00
return camo_client.rewrite_url(url)