from django.shortcuts import render from rakka.utils import rerender from . import models from main.models import Update @rerender def nerdshope(): accounts=models.BankAccount.objects.all() sums={curr:sum([n.balance for n in filter(lambda x:x.currency==curr,accounts)]) for curr in set(map(lambda x:x.currency,accounts))} moneyblob='\n
  • '.join([f'{k}: {v}' for k,v in sums.items()]) moneyblob='Current monetary state: ' return {'title':"Nerds' Hope",'content':"Store stuff. TODOing. Will include inventory and budget. FB
    \nAddress is 21 Kensington St, Glenorchy
    \nOff dates 2022: 29th April, 6th May, 27th May, 17th June, 24th June
    \n"+moneyblob,'date':Update.objects.get_or_create(page='nh_main')[0].date} @rerender def budget(): pass