Files
2020-02-26 08:57:16 -08:00

30 lines
654 B
Python

from webhelpers import * # noqa
class ExceptionWithCodeMethod(Exception):
"""Use case where the status code is defined by
the `code()` method.
"""
def __init__(self, message):
super(ExceptionWithCodeMethod, self).__init__(message)
def code():
pass
class AppGlobals(object):
"""Object used to store application globals."""
pass
def get_render_fn():
"""Re-import the function everytime so that double-patching
is correctly tested.
"""
try:
from pylons.templating import render_mako as render
except ImportError:
from pylons.templating import render
return render