In my django app, a Task can have PENDING or FINISHED status.Which is the best way to model this in a django Model?
class Task(models.Model):
taskname = models.CharFiled(...)
taskdate = models.DateTimeField()
status = models.CharFiled(...)
Is this the proper way? Ideally I would like to provide the user with a dropdown list from which he can choose the status.Can someone suggest how I can model this ?
It can be any type of field like
CharorIntbut you can provide list of choices to it which will show as dropdown in the html form.Reference at Model field Choices