Skip to content

Instantly share code, notes, and snippets.

@jjangdm
Created February 24, 2013 09:47
Show Gist options
  • Save jjangdm/5023264 to your computer and use it in GitHub Desktop.
Save jjangdm/5023264 to your computer and use it in GitHub Desktop.
제가 만든 방법
income_list = []
for n in range(1,13):
temp = sum(Income.objects.filter(date__month="%s" %n).values_list("money", flat=True))
income_list.append(temp)
#EXPECTED RESULT
[100000, 0, 250000, ......, 0] 원소 12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment