Download testbed/django__django/tests/conditional_processing/views.py from hc99/FEA-Bench: direct link, hf CLI and curl.
- Browser
- Download file 1.3 kB
-
https://huggingface.co/datasets/hc99/FEA-Bench/resolve/main/testbed/django__django/tests/conditional_processing/views.py
- Command line
-
hf download hf://datasets/hc99/FEA-Bench/testbed/django__django/tests/conditional_processing/views.py
-
curl -L -o views.py https://huggingface.co/datasets/hc99/FEA-Bench/resolve/main/testbed/django__django/tests/conditional_processing/views.py
1.3 kB
| from django.http import HttpResponse | |
| from django.views.decorators.http import condition, etag, last_modified | |
| from .tests import ETAG, FULL_RESPONSE, LAST_MODIFIED, WEAK_ETAG | |
| def index(request): | |
| return HttpResponse(FULL_RESPONSE) | |
| def last_modified_view1(request): | |
| return HttpResponse(FULL_RESPONSE) | |
| def last_modified_view2(request): | |
| return HttpResponse(FULL_RESPONSE) | |
| def etag_view1(request): | |
| return HttpResponse(FULL_RESPONSE) | |
| def etag_view2(request): | |
| return HttpResponse(FULL_RESPONSE) | |
| def etag_view_unquoted(request): | |
| """ | |
| Use an etag_func() that returns an unquoted ETag. | |
| """ | |
| return HttpResponse(FULL_RESPONSE) | |
| def etag_view_weak(request): | |
| """ | |
| Use an etag_func() that returns a weak ETag. | |
| """ | |
| return HttpResponse(FULL_RESPONSE) | |
| def etag_view_none(request): | |
| """ | |
| Use an etag_func() that returns None, as opposed to setting etag_func=None. | |
| """ | |
| return HttpResponse(FULL_RESPONSE) | |