Re: Can we use python related api's on the Django templates ?

2020-05-28 Thread Derek
While you cannot use Python operators and functions directly in the templates, you can write your own "wrappers" around those you need: https://docs.djangoproject.com/en/3.0/howto/custom-template-tags/ On Wednesday, 27 May 2020 15:57:34 UTC+2, Daniel Roseman wrote: > > On Wednesday, 27 May

Re: Can we use python related api's on the Django templates ?

2020-05-27 Thread Daniel Roseman
On Wednesday, 27 May 2020 13:21:24 UTC+1, ratnadeep ray wrote: > > Hi all, > > Currently I am trying to print the type of a variable from the Django > template html file as follows: > > The type of feature list report for version >> {%type(version)%} is > > > For the above, I am getting

Can we use python related api's on the Django templates ?

2020-05-27 Thread ratnadeep ray
Hi all, Currently I am trying to print the type of a variable from the Django template html file as follows: The type of feature list report for version > {%type(version)%} is For the above, I am getting the following error: Invalid block tag on line 9: 'type(version)'. Did you