Django Setup:TypeError: 'pub_date' is an invalid keyword argument for this function
<p>I am facing the error bellow, during the django setup</p>

<blockquote>
  <p>raise TypeError("'%s' is an invalid keyword argument for this function" % list(kwargs)[0])<br>
  TypeError: 'pub_date' is an invalid keyword argument for this function</p>
</blockquote>

<p><strong>Models.py</strong></p>

<pre><code>from django.db import models
from django.utils.encoding import python_2_unicode_compatible
import datetime
from django.utils import timezone

# Create your models here.

class Poll(models.Model):
    question = models.CharField(max_length=200)
    pub_date = models.DateTimeField('date published')

class Choice(models.Model):
    poll = models.ForeignKey(Poll)
    choice_text = models.CharField(max_length=200)
    votes = models.IntegerField(default=0)

@python_2_unicode_compatible  # only if you need to support Python 2
class Question(models.Model):
    # ...
    def __str__(self):
        return self.question_text

@python_2_unicode_compatible  # only if you need to support Python 2
class Choice(models.Model):
    # ...
    def __str__(self):
        return self.choice_text

class Question(models.Model):
    # ...
    def was_published_recently(self):
        return self.pub_date &gt;= timezone.now() - datetime.timedelta(days=1)
</code></pre>