Django templates tag error
- by Hulk
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;"/>
{% 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.