accept `instance` as a signal handler argument.
Use render_to_string instead of custom functions.