some register.inclusion_tag error in my code using django
- by zjm1126
my helloworld_tags:
from django import template
register = template.Library()
def show_profile():
return {"eee": '333'}
register.inclusion_tag("b.html")(show_profile)
my view:
def b(request):
return render_to_response('b.html')
my html:
{% load helloworld_tags%}
dsad {{ eee }}
but only show 'dsad' ,not show 'dsad333'
why??
thanks