2012-04-25 19:17:47 +00:00
|
|
|
from django.core.xheaders import populate_xheaders
|
2010-01-10 17:21:52 +00:00
|
|
|
from django.http import HttpResponse
|
|
|
|
from django.utils.decorators import decorator_from_middleware
|
2010-10-18 23:58:06 +00:00
|
|
|
from django.views.generic import View
|
2010-01-10 17:21:52 +00:00
|
|
|
from django.middleware.doc import XViewMiddleware
|
|
|
|
|
2012-04-25 19:17:47 +00:00
|
|
|
from .models import Article
|
|
|
|
|
2010-01-10 17:21:52 +00:00
|
|
|
xview_dec = decorator_from_middleware(XViewMiddleware)
|
|
|
|
|
|
|
|
def xview(request):
|
|
|
|
return HttpResponse()
|
2010-10-18 23:58:06 +00:00
|
|
|
|
2012-04-25 19:17:47 +00:00
|
|
|
def xview_xheaders(request, object_id):
|
|
|
|
response = HttpResponse()
|
|
|
|
populate_xheaders(request, response, Article, 1)
|
|
|
|
return response
|
|
|
|
|
2010-10-18 23:58:06 +00:00
|
|
|
class XViewClass(View):
|
2011-04-26 16:56:17 +00:00
|
|
|
def get(self, request):
|
2010-10-18 23:58:06 +00:00
|
|
|
return HttpResponse()
|