some register.inclusion_tag error in my code using django

Posted by zjm1126 on Stack Overflow See other posts from Stack Overflow or by zjm1126
Published on 2010-04-26T07:33:14Z Indexed on 2010/04/26 8:03 UTC
Read the original article Hit count: 271

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

© Stack Overflow or respective owner

Related posts about django

Related posts about register.inclusion-tag