def render_from_task(template, task):
 variables = {u'task': task, u'now': datetime.now(), u'task_name': task.name}
 return render(template, variables)

def render_from_task ( template , task ) : variables = { u'task' : task , u'now' : datetime . now ( ) , u'task_name' : task . name } return render ( template , variables )
renders a template with a task as its context .