Joe,

My orginal code (see the inclusion tag below ) was returning a Query
Set and an interable list.   I can't understand how I can loop through
the Query set and append the data to the end - as there is no matching
attribute in the Query set.

 I am looking to return a query set and build a table from it.  The
last column in the table is the sum of the all the previous rows.
Here's an example.

credit   Balance
50          50
40          90
50        140


Here's my orginal inclusion tag


@register.inclusion_tag('cashtransfer.html')
def show_cash_transfer(username):
    balance=[]
    x=0
    qs=CashTransfer.objects.filter(user=username)
    qs1=qs[0]
    for cash in qs:
        x=cash.credit+x
        balance.append(x)
    return { 'transfers': qs, 'balance': balance }


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to