old_contents: from django import template
  
  register = template.Library()
  
  def pdb_trace(variable):
      import pdb; pdb.set_trace()
      return variable
  
  register.filter('pdb_trace', pdb_trace)
  
new_contents: from django import template
  
  register = template.Library()
  
  def pdb_trace(variable):
      import pdb; pdb.set_trace()
      return variable
  
  register.filter('pdb_trace', pdb_trace)
  
  @register.filter(name='lookup')
  def lookup(dict, index):
      if index in dict:
          return dict[index]
      return ''
  
subject: add lookup filter since django template can't lookup dynamic dict index