title: How do I resolve a type-error that int() argument must be a string, a bytes-like object or a number, not 'datetime.datetime' in polls app?
body: <p>My models.py is</p>
  
  <pre><code>class Question(models.Model):
      CATEGORY_SIZES = (
      ('W', 'WORlD'),
      ('T', 'TECHNOLOGY'),
      ('S', 'SCREEN'),
      ('P', 'SPORTS')
  )
      question_text = models.CharField(max_length= 100)
      pub_date = models.DateTimeField('Date Is Published')
      image = models.ImageField(upload_to="Question_Image", blank=True)
      category = models.CharField(max_length=1, choices=CATEGORY_SIZES)
  
      def __str__(self):
          return self.question_text
  
  class Choice(models.Model):
      choice_text = models.CharField(max_length= 200)
      votes = models.IntegerField(default= 0)
      image2 = models.ImageField(upload_to="Question_Image2", blank=True)
      question = models.ForeignKey(Question, on_delete= models.CASCADE)
  
      def __str__(self):
          return  self.choice_text
  
      def vote_range(self):
          return range(0, self.votes)
  </code></pre>
  
  <p>And, I added four views in format inside views.py</p>
  
  <pre><code>def world(request):
      latest_questions = Question.objects.filter(category='W')
      context = {'latest_questions': latest_questions}
      return render(request, 'polls/world.html',context)
  </code></pre>
  
  <p>Then, I ran a command</p>
  
  <pre><code>python manage.py makemigrations polls
  </code></pre>
  
  <p>and set timezone.now as default for category</p>
  
  <p>Then, I ran another command</p>
  
  <pre><code>python manage.py migrate
  </code></pre>
  
  <p>And, I got this type error that </p>
  
  <blockquote>
    <p>TypeError: int() argument must be a string, a bytes-like object or a
    number, not 'datetime.datetime'</p>
  </blockquote>