def env_test_worker(request): signal_hub.fire('signal-test', request) return ( 200, get_response(request), { 'mimetype': 'text/html', 'enc': OUTPUT_ENC, }, )
def multiformat_test_view(request, val): signal_hub.fire('signal-test', request) try: val = int(val) except ValueError: val = 0 return ( 200, { 'visits': request.session['visited'], 'value': val, 'results': [val + 2, val * 2, val ** 2, ], }, {'mimetype': 'text/plain', 'enc': OUTPUT_ENC, }, )