Skip to content

Instantly share code, notes, and snippets.

View jjangdm's full-sized avatar

JANGDONGMIN jjangdm

  • I'm free.
  • Suwon-city
View GitHub Profile
@dittos
dittos / replace.py
Created December 4, 2012 11:08 — forked from jjangdm/replace.py
please
def report(request):
today = datetime.datetime.now()
executor = Executor.objects.all()
queryset = Budget.objects.filter(year=today.year)
aggregates = {}
for i in xrange(1, 25+1):
aggregates['out%d' % i] = models.Sum('out%d' % i)
budget = queryset.aggregate(**aggregates)
@toracle
toracle / replace.py
Created December 4, 2012 10:38 — forked from jjangdm/replace.py
please
def report(request):
today = datetime.datetime.now()
executor = Executor.objects.all()
budgets = {'management_budgets': ['out1', 'out2', 'out3', 'out4'],
'education_budgets': ['out5', 'out6', 'out7'],
'feed_budgets': ['out8', 'out9', 'out10', 'out11', 'out12', 'out13'],
'reward_budgets': ['out14', 'out15', 'out16'],
'mission_budgets': ['out17', 'out18', 'out19', 'out20', 'out21'],
'operation_budgets': ['out22', 'out23', 'out24', 'out25']}