File: views.py

package info (click to toggle)
python-falcon 4.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,172 kB
  • sloc: python: 33,608; javascript: 92; sh: 50; makefile: 50
file content (16 lines) | stat: -rw-r--r-- 383 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import django
from django.http import HttpResponse

_body = django.x_test_body
_headers = django.x_test_headers


def hello(request, account_id):
    user_agent = request.META['HTTP_USER_AGENT']  # NOQA
    limit = request.GET.get('limit', '10')  # NOQA
    response = HttpResponse(_body)

    for name, value in _headers.items():
        response[name] = value

    return response