Update models.py
some edits and delete that m****f**** VOICE!!
This commit is contained in:
@@ -33,6 +33,8 @@ class Image(models.Model):
|
|||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.image.name
|
return self.image.name
|
||||||
|
|
||||||
|
'''
|
||||||
|
# there is no need to add voices.it must change in designs too!!!!
|
||||||
|
|
||||||
class Voice(models.Model):
|
class Voice(models.Model):
|
||||||
voice = models.FileField(upload_to="audios/", null=True, blank=True)
|
voice = models.FileField(upload_to="audios/", null=True, blank=True)
|
||||||
@@ -43,14 +45,16 @@ class Voice(models.Model):
|
|||||||
return self.voice.name
|
return self.voice.name
|
||||||
else:
|
else:
|
||||||
return "null"
|
return "null"
|
||||||
|
'''
|
||||||
|
|
||||||
class Job(models.Model):
|
class Job(models.Model):
|
||||||
TYPE_CHOICES = [
|
TYPE_CHOICES = [
|
||||||
("Irrigating", "IRRIGATING"),
|
("Irrigation", "IRRIGATING"),
|
||||||
("Planting", "PLANTING"),
|
("Planting", "PLANTING"),
|
||||||
("PrePlanting", "PREPLANTING"),
|
("PrePlanting", "PREPLANTING"),
|
||||||
("Fertilizing", "FERTILIZING"),
|
("Fertilizing", "FERTILIZING"),
|
||||||
|
#add spraying for poisions bc we added fertilizers so we need it too!
|
||||||
|
("Spraying", "SPRAYING"),
|
||||||
("Pruning", "PRUNING"),
|
("Pruning", "PRUNING"),
|
||||||
("Harvesting", "HARVESTING"),
|
("Harvesting", "HARVESTING"),
|
||||||
]
|
]
|
||||||
@@ -61,7 +65,8 @@ class Job(models.Model):
|
|||||||
status = models.BooleanField()
|
status = models.BooleanField()
|
||||||
costs = models.ForeignKey(Cost, on_delete=models.SET_NULL, null=True, blank=True)
|
costs = models.ForeignKey(Cost, on_delete=models.SET_NULL, null=True, blank=True)
|
||||||
notes = models.ForeignKey(Note, on_delete=models.SET_NULL, null=True, blank=True)
|
notes = models.ForeignKey(Note, on_delete=models.SET_NULL, null=True, blank=True)
|
||||||
voices = models.ForeignKey(Voice, on_delete=models.SET_NULL, null=True, blank=True)
|
##########REMOVE THIS MF!
|
||||||
|
#voices = models.ForeignKey(Voice, on_delete=models.SET_NULL, null=True, blank=True)
|
||||||
images = models.ForeignKey(Image, on_delete=models.SET_NULL, null=True, blank=True)
|
images = models.ForeignKey(Image, on_delete=models.SET_NULL, null=True, blank=True)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user