# Create your views here.
from django.core.cache import cache
import os
import time
from datetime import datetime, date, timedelta
import cx_Oracle
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from rest_framework.renderers import JSONRenderer
from rest_framework.parsers import JSONParser
from rest_framework import status
from rest_framework.decorators import api_view
class JSONResponse(HttpResponse):
    """
    An HttpResponse that renders it's content into JSON.
    """
    def __init__(self, data, **kwargs):
        content = JSONRenderer().render(data)
        kwargs['content_type'] = 'application/json'
        super(JSONResponse, self).__init__(content, **kwargs)
@csrf_exempt
def memcache_list(request):
	cantidadprocesados=0
	errores={}
	contenedor=[]
	contenedorerror=[]
	response={}
	rta={}
	pruebacon={}
	response['status']=0
	response['totalRows']=1
	response['startRow']=0
	response['endRow']=1
	pruebacon['resultado']=cache.get("foo")
	contenedor.append(pruebacon)
	response['data']=contenedor
	rta['response']=response
	return JSONResponse(rta)