Re: how to fetch data into a template (table)

2020-06-23 Thread Faith Mwai
Am querying from a table already in production and need data to be real time hence the reason of using the raw sql. Let me modify and see whether it works On Monday, June 22, 2020 at 10:03:22 PM UTC+3, larry@gmail.com wrote: > > On Sat, Jun 20, 2020 at 11:41 AM Faith Mwai > wrote: > > > >

Re: how to fetch data into a template (table)

2020-06-22 Thread Larry Martell
On Sat, Jun 20, 2020 at 11:41 AM Faith Mwai wrote: > > Am having a challenge of displaying data into my template table, the function > is; > > def customers(request): > if request.method == 'POST': > accountno = request.POST['accountno'] > id= request.POST['id'] > Mobi

Re: how to fetch data into a template (table)

2020-06-22 Thread Kasper Laudrup
Hi Faith, On 20/06/2020 12.27, Faith Mwai wrote: Am having a challenge of displaying data into my template table, the function is; def customers(request): if request.method =='POST': accountno= request.POST['accountno'] id= request.POST['id'] Mobilenumber = requ

Re: how to fetch data into a template (table)

2020-06-22 Thread Faith Mwai
Yes in an HTML template On Saturday, June 20, 2020 at 6:41:57 PM UTC+3, Faith Mwai wrote: > > Am having a challenge of displaying data into my template table, the > function is; > > def customers(request): > if request.method == 'POST': > accountno = request.POST['accountno'] >

Re: how to fetch data into a template (table)

2020-06-22 Thread Jatin Agrawal
Where do you want to display the data? in HTML template? On Saturday, June 20, 2020 at 9:11:57 PM UTC+5:30, Faith Mwai wrote: > > Am having a challenge of displaying data into my template table, the > function is; > > def customers(request): > if request.method == 'POST': > accountno

how to fetch data into a template (table)

2020-06-20 Thread Faith Mwai
Am having a challenge of displaying data into my template table, the function is; def customers(request): if request.method == 'POST': accountno = request.POST['accountno'] id= request.POST['id'] Mobilenumber = request.POST['Mobilenumber'] cursor = con.cursor()