# foo = Event.objects.raw("select date_format(date, '%Y-%m') as month, sum(quantity) as hours from hourentries group by date_format(date, '%Y-%m') order by date;")
# q = "SELECT * from gracedb_event LIMIT 10"
# q = "SELECT date_format(created, '%%Y-%%m') as month, COUNT(*) AS total FROM gracedb_event GROUP BY date_format(created, '%%Y-%%m') order by created"
# cursor = connection.cursor()
# cursor.execute(q)
# desc = cursor.description
# foo = [ dict(zip([col[0] for col in desc], row))
# for row in cursor.fetchall()
# ]
foo="I AM THE FOO"
returnrender_to_response(
'gracedb/datas.html',
{'thing':str(foo)},
context_instance=RequestContext(request))
defsource(request):
tq=request.GET.get('tq',"")
tqx=request.GET.get('tqx',"")
atypes=["OM","LM"]
description=[("Year","string"),]
buffy=[]
things=dict(zip(atypes,[{}]*len(atypes)))
things={}
dates=set()
fortinatypes:
description.append((t,"number"))
q="SELECT date_format(created, '%%Y-%%m') as month, COUNT(*) AS total FROM gracedb_event WHERE analysisType = %s GROUP BY date_format(created, '%%Y-%%m')"
q="SELECT date_format(created, '%%Y-%%m') as month, analysisType, COUNT(*) AS total FROM gracedb_event GROUP BY date_format(created, '%%Y-%%m'),analysisType order by created"