Solve the problem that underlined variables cannot be used in Django templates

From , 2 Years ago, written in Python, viewed 222 times.
URL https://pastebin.vip/view/e3978ba7
  1. from django import template
  2. register = template.Library()
  3.  
  4. def mongo_id(value):
  5.     '''返回mongo的_id属性'''
  6.     return value.get('_id','')
  7. register.filter(mongo_id)
  8.  
  9.  

Reply to "Solve the problem that underlined variables cannot be used in Django templates"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website