can't get datatables work with django
can't get datatables work with django
I am trying to use datatables in a django application.
Here is my code.
[code]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
My web application
@import "./DataTables-1.9.0/media/css/demo_table.css";
$(document).ready( function () {
$('#table_id').dataTable();
} );
{% if success %}
{{ my_form.as_p }}
{%for x in htl%}
{{x}}
{% endfor%}
{% for x in mytable %}
{% for y in x %}
{{y}}
{%endfor %}
{% endfor%}
{% else %}
Please enter Project codes and
Gene names(case insensitive - one gene per line) in the bottom box
{{ my_form.as_p }}
{% endif %}
[/code]
I want to pass a python list with each row as an item in the list and format the table in the template.html as is seen from the code. I couldn't get datatables working at all. Any ideas?
Thanks
Here is my code.
[code]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
My web application
@import "./DataTables-1.9.0/media/css/demo_table.css";
$(document).ready( function () {
$('#table_id').dataTable();
} );
{% if success %}
{{ my_form.as_p }}
{%for x in htl%}
{{x}}
{% endfor%}
{% for x in mytable %}
{% for y in x %}
{{y}}
{%endfor %}
{% endfor%}
{% else %}
Please enter Project codes and
Gene names(case insensitive - one gene per line) in the bottom box
{{ my_form.as_p }}
{% endif %}
[/code]
I want to pass a python list with each row as an item in the list and format the table in the template.html as is seen from the code. I couldn't get datatables working at all. Any ideas?
Thanks
This discussion has been closed.