I have created a Task model:
class Task(models.Model):
name = models.CharField(max_length=200, null=True)
author = models.ForeignKey(User, on_delete=models.DO_NOTHING, blank=True, null=True)
company = models.ForeignKey(Company, on_delete=models.DO_NOTHING)
eta = models.CharField(max_length=20, null=True, blank=True)
I want the eta to be saved as a CharField that will be inputed by the user via two fields: one field for the measurement, for example: months, days, minutes etc. and one field for the amount, for example: 1, 4, 10 etc...
at the end I would like to have the eta field be '1 hour', '30 minutes', '2 weeks' etc...
I want the user to input the fields and then have the backend save them in to the right format.
can anyone help with how to do this? or maybe if someone has an idea on how to do this in a better way. I want to make an application that will detect when the ETA already passed and alert the user of that.