+ return IncludeNode(template_name[1:-1])
+
+@register.filter(name='file_exists')
+def file_exists(filepath):
+ if default_storage.exists('portal' + filepath):
+ return filepath
+ else:
+ index = filepath.rfind('/')
+ new_filepath = filepath[:index] + '/image.png'
+ return new_filepath
\ No newline at end of file