문제

I used django_tables2(http://django-tables2.readthedocs.org/en/latest/) for HTML tables rendering, but my template failed to work:

{% extends 'base.html' %}
{% block main %}
    {% render_table table %} 
{% endblock %}

The error message as following:

Invalid block tag: 'render_table', expected 'endblock'

And is there any alternative to the above tables2 plugin?

도움이 되었습니까?

해결책

The docs states that You must include the following declaration before loading anything:

{% load render_table from django_tables2 %}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top