support for rendering local templates

without access to request-based API (for instance in a celery task)