from django.shortcuts import render
from django.http import HttpResponse
from django.utils import timezone
from django.core import serializers
import pytz

from dolar_blue.models import DolarBlue

def lastPrice():
  return DolarBlue.objects.order_by('-date').last()

def index(request):
  timezone.activate(pytz.timezone("America/Argentina/Buenos_Aires"))
  last_price = lastPrice()
  context = { 'last_price': last_price }

  return render(request, 'index.html', context)

def json_lastprice(request):
  last_price = lastPrice().json()
  return HttpResponse(last_price, mimetype="application/json")
@@ -238,28 +238,11 @@
 cts.
-order_by('-date').la
+fir
 st()

Change to last record