title: How do I write a Django query that does date math when executed as PostGres SQL?
body: <p>I'm using Django and Python 3.7.  I'm writing a Django query to be run on a PostGres 9.4 db, but having trouble figuring out how to form my expression wrapper so that I add a number of seconds (an integer) to an existing date column.  I tried the below</p>
  
  <pre><code>hour_filter = ExtractHour(ExpressionWrapper(
              F("article__created_on") + timedelta(0,
                                                   F("article__websitet__avg_time_in_seconds_to_reach_ep")),
              output_field=models.DateTimeField)
          ),
  )
  </code></pre>
  
  <p>but I'm getting the error</p>
  
  <pre><code>unsupported type for timedelta seconds component: F
  </code></pre>
  
  <p>Any ideas how I can rewrite my ExpressionWrapper to do the date math inside the PostGres query?</p>
  
  <p><b>Edit;</b> Here are the models and relevant fields ...</p>
  
  <pre><code>class Website(models.Model):
      ...
      avg_time_in_seconds_to_reach_ep = models.FloatField(default=0, null=True)
  
  
  class Article(models.Model):
      objects = ArticleManager()
      website = models.ForeignKey(Website, on_delete=models.CASCADE, related_name='articlesite')
  </code></pre>