Django-tables2: ValueError at /interactive_table/ Expected table or queryset, not str
<p>I was following along with the tutorial for Django-tables2 tutorial (which can be found here: <a href="https://django-tables2.readthedocs.io/en/latest/pages/tutorial.html" rel="nofollow">https://django-tables2.readthedocs.io/en/latest/pages/tutorial.html</a>). I've fixed all the errors up until now, but I've hit one that I cannot solve. It says that my code expected a table or queryset, not a string. </p>

<p>I've looked around, and all the solutions to this problem all blame the version being out of date, but I have updated it and I still get this error. </p>

<p>Does anybody know what I'm doing wrong?</p>

<p>Here is my views.py:</p>

<pre><code>from django.shortcuts import render
from interactive_table import models

def people(request):
    return render(request, 'template.html', {'obj': models.people.objects.all()})
</code></pre>

<p>Here is my models.py:</p>

<pre><code>    from django.db import models

class people(models.Model):
    name = models.CharField(max_length = 40, verbose_name = 'Full Name')
</code></pre>

<p>Here is my template.html:</p>

<pre><code>{# tutorial/templates/people.html #}
{% load render_table from django_tables2 %}
&lt;!doctype html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;link rel="stylesheet" href="{{ STATIC_URL }}django_tables2/themes/paleblue/css/screen.css" /&gt;
    &lt;/head&gt;
    &lt;body&gt;
        {% render_table people %}
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>change <code>obj</code> to <code>people</code> in render function.</p>

<p>Try to understand how templates and template variables work with django. </p>

<p>Documentations might be a good place to <a href="https://docs.djangoproject.com/en/1.10/topics/templates/" rel="nofollow">look</a></p>

python django django-tables2