from django.shortcuts import render
from django.template.loader import get_template
from django.template import Context
from django.http import HttpResponse
import datetime

from django.db.models import Q
from register.models import Petitions

def lastSignals(request):
	t = get_template('lastSignals.html')
	signals = Petitions.objects.filter().order_by("-date")
	html = t.render(Context({'signals' : signals}))
	return HttpResponse(html)