In View, dataTables.net table is rendered.
It is using 'sAjaxSource'.
In each row, Add / Edit links are required in the last column.
Empty table structure is defined in View.
Table data is populated via sAjaxSource (controller action).
relevant code in that server-side controller function --> (pl. see the
3rd line with "lnk_elmt = ....')
[code]
aaData = []
for i in salheads_disp:
lnk_elmt = "<a href='%s'> Edit </a>" % "{{=URL(('empmast',
'emp_edit'))}}"
aaData.append([i['salheadid'], i['headnm'], i['type'],
i['frequency'],[lnk_elmt]])
D=dict(sEcho=sEcho, iTotalRecords=iTotalRecords,
iTotalDisplayRecords=iTotalDisplayRecords,
iDisplayLength=iDisplayLength, aaData=aaData)
return response.json(D)
[/code]
The table displays the link correctly, but the 'href' is not formed
correctly.
It points to :--->
http://127.0.0.1:8000/payroll/salheadmast/%7B%7B=URL((
What change I need to make in the code-line?
Thanks,
Vineet