blob: c88236e21b679d1b1ea09d8a0b96f6e8523d9641 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# -*- coding:utf-8 -*-
from django.views.decorators.http import condition
from django.http import HttpResponse
from models import FULL_RESPONSE, LAST_MODIFIED, ETAG
@condition(lambda r: ETAG, lambda r: LAST_MODIFIED)
def index(request):
return HttpResponse(FULL_RESPONSE)
@condition(last_modified_func=lambda r: LAST_MODIFIED)
def last_modified(request):
return HttpResponse(FULL_RESPONSE)
@condition(etag_func=lambda r: ETAG)
def etag(request):
return HttpResponse(FULL_RESPONSE)
|