title: How can i add days to a datetime field on a django model, using a IntegerField of the same model?
body: <p>like i say in the title i need to fill automatically a field of my Django Model specifically a DateField adding X number of days that i specify in the same model form.</p>
  
  <p>In my case i need to add the number of days taht i put in "total_days" to the date that i use in the field "start_day" and save the result on "end_day".</p>
  
  <p>Here is the model:</p>
  
  <pre><code>class Certificate(models.Model):
  
      employee = models.ForeignKey(Employee)
      license_type = models.IntegerField(choices=LICENSE_TYPES, default=1)
      disease_type = models.IntegerField(choices=DESEASE_TYPES, blank=True, null=True)
      total_days = models.PositiveIntegerField()
      extra_days = models.PositiveIntegerField(Default=0)
      start_day = models.DateField()
      end_day = models.DateField(, editable=False)
      doctor = models.ForeignKey(Doctor)
      diagnostic = models.CharField(max_length=150)
      created = models.DateTimeField(auto_now_add=True)
      updated = models.DateTimeField(auto_now=True)
      created_by = models.ForeignKey(User, related_name='certificates_created_by', editable=False)
      modified_by = models.ForeignKey(User, related_name='certificates_modified_by', editable=False, blank=True, null=True)
  
  
      class Meta:
          verbose_name = "certificado"
          verbose_name_plural = "certificados"
  
      def __str__(self):
          pass
  </code></pre>
  
  <p>Well i try using "timedelta" but i can't use the start_day field because not detect this like a integer. And timedelta need a integer parameter.</p>
  
  <p>Any Idea about how i can do this???</p>
  
  <p>Now i'm doing this directly on the view and send the result on the context to the template. But the user needs to keep this from the first into the database.</p>
  
  <p>Thanks very much!</p>