title: creating a custom template tags in django
body: <p>I am new to Django and I am trying to create custom tags in django</p>
  
  <p>my custom tag file <code>templatetag/custom_tag.py</code></p>
  
  <pre><code>from django import template
  from model_file.models import my_Model
  
  register = template.Library()
  
  @register.simple_tag
  def get_custom_tag_fn():
  
      return my_Model.objects.all()
  </code></pre>
  
  <p>my html file</p>
  
  <pre><code>{% load custom_tag %}
      {% get_custom_tag_fn as queries %}
      {% for query in queries %}
        {{query.json_my_model_data}}
      {% endfor %}  
  </code></pre>
  
  <p>I am not getting any output or error from this code. Can anyone point where I went wrong.   </p>
  
  <p>for extra information my <code>model.py</code> looks like  </p>
  
  <pre><code>from django.db import models
  from jsonfield import JSONField
  
  class my_Model(models.Model):
      json_my_model_data = JSONField()
  </code></pre>