Why am I getting the error: OperationalError at /table/ no such table: table_book
<p>Whenever I run the program, I get the following error:</p>

<pre><code>OperationalError at /table/ 
no such table: table_book
</code></pre>

<p>It says that there's an error on line 7 in my template file.</p>

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

<pre><code>&lt;table&gt;
&lt;tr&gt;
  &lt;th&gt;author&lt;/th&gt;
  &lt;th&gt;title&lt;/th&gt;
  &lt;th&gt;publication year&lt;/th&gt;
&lt;/tr&gt;
{% for b in obj %}
&lt;tr&gt;
  &lt;td&gt;{{ b.author }}&lt;/td&gt;
  &lt;td&gt;{{ b.title }}&lt;/td&gt;
  &lt;td&gt;{{ b.publication_year }}&lt;/td&gt;
&lt;/tr&gt;
{% endfor %}
&lt;/table&gt;
</code></pre>

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

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

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

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

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

class Book(models.Model):
    author = models.CharField(max_length = 20)
    title = models.CharField(max_length = 40)
    publication_year = models.IntegerField()
</code></pre>

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

<pre><code>from django.conf.urls import url
from . import views

urlpatterns = [
    # /table/
    url(r'^$', views.display, name='display'),
]
</code></pre>

<p>Can somebody please tell me what is wrong?</p>

<p>The database table table_book is missing. Did you run makemigrations and migrate ?</p>

python django