2008-03-18 01:47:34 +08:00
|
|
|
from django.http import HttpResponse
|
|
|
|
from django.utils.decorators import decorator_from_middleware
|
|
|
|
from django.middleware.doc import XViewMiddleware
|
|
|
|
|
|
|
|
|
|
|
|
xview_dec = decorator_from_middleware(XViewMiddleware)
|
|
|
|
|
|
|
|
def xview(request):
|
|
|
|
return HttpResponse()
|
|
|
|
xview = xview_dec(xview)
|
2010-03-12 21:06:13 +08:00
|
|
|
|
|
|
|
|
|
|
|
class ClassXView(object):
|
|
|
|
def __call__(self, request):
|
|
|
|
return HttpResponse()
|
|
|
|
|
|
|
|
class_xview = xview_dec(ClassXView())
|