Django templates tag error

Posted by Hulk on Stack Overflow See other posts from Stack Overflow or by Hulk
Published on 2010-06-16T10:43:10Z Indexed on 2010/06/16 13:52 UTC
Read the original article Hit count: 366

def _table_(request,id,has_permissions):
    dict = {}
    dict.update(get_newdata(request,rid))
    return  render_to_response('home/_display.html',context_instance=RequestContext(request,{'dict': dict, 'rid' : rid, 'has_permissions' : str(has_permissions)}))

In templates the code is as,

{% if has_permissions == "1" %}
<input type="button" value="Edit" id="edit" onclick="javascript:edit('{{id}}')"  style="display:inline;"/>&nbsp;&nbsp;&nbsp;&nbsp;
{% endif %}

There is a template error in has_permissions line. Can any 1 tell me what is wrong here. has_permissions has the value 1 or 0.

© Stack Overflow or respective owner

Related posts about python

Related posts about django