Hi, I need some help, i am using Django as my web framework and sqlalchemy to query my database. When i pass data template its not showing on the template. can someone point me to the right direction.
The post date is loaded on the template but the Net Balance is not loaded. Don't know what i am doing wrong here. below is my view.py and template view.py def SUMCORP(request): engine=create_engine('mssql+pymssql://username:pass@servername /RBVData') connection=engine.connect() metadata=MetaData() fund=Table('gltrxdet',metadata,autoload=True,autoload_with=engine) stmt=select([fund.columns.date_posted,func.sum(fund.columns.nat_balance)]) stmt = stmt.where(fund.columns.account_code=='002CORP') stmt=stmt.group_by(fund.columns.date_posted) results=connection.execute(stmt).fetchall() return render_to_response('fundmanager_sum.html',locals()) template.html <table class="table table-striped"> <thead> <tr> <th>Net Balance</th> <th>Post Date</th> </thead> </tr> {%for a in results%} <tr> <td>{{a.nat_balance}}</td> <td>{{a.date_posted}}</td> </tr> {%endfor%} </table> -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPCf-y7tGoLm2hxPaQpBrrm_j0VJvTF1UvE%3D-vQgbjh%3DzCxEMg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.