django template variable code example
Example 1: access django template variable in javascript
<script type="text/javascript">
var a = "{{someDjangoVariable}}";
</script>
Example 2: template tags in django
from django import template
register = template.Library()
#simle Tag
@register.simple_tag
def fun_name(data):
return data
Example 3: django html templates
Django templates folder