From 2929759e538ecc4cf11423e0155357d8ad36a7a3 Mon Sep 17 00:00:00 2001 From: Wanessa Bezerra Date: Tue, 3 Nov 2020 18:54:15 -0300 Subject: [PATCH 1/2] =?UTF-8?q?Atualiza=C3=A7=C3=A3o=20na=20classe=20Link?= =?UTF-8?q?=20#14?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tasktracking/tasks/models.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tasktracking/tasks/models.py b/tasktracking/tasks/models.py index 7bbf7cc..7fabefa 100644 --- a/tasktracking/tasks/models.py +++ b/tasktracking/tasks/models.py @@ -15,6 +15,17 @@ class Tag(models.Model): class Link(models.Model): nome = models.CharField(max_length=50) url = models.URLField() + def __str__(self, nome, url): + self.nome + self.url + def setNome(self): + return self.nome + def setUrl(self): + return self.url + def getNome(self): + return self.nome + def getUrl(self): + return self.url class Tarefa(models.Model): STATUS_CHOICES = ( From 1be55971ea4ba1046cc77bc9be819a1e26a554f7 Mon Sep 17 00:00:00 2001 From: Wanessa Bezerra Date: Thu, 5 Nov 2020 17:40:37 -0300 Subject: [PATCH 2/2] =?UTF-8?q?Remo=C3=A7=C3=A3o=20dos=20m=C3=A9todos=20ge?= =?UTF-8?q?t=20e=20set=20e=20altera=C3=A7=C3=A3o=20no=20m=C3=A9todo=20str?= =?UTF-8?q?=20#14=20#15?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tasktracking/tasks/models.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/tasktracking/tasks/models.py b/tasktracking/tasks/models.py index 7fabefa..d17ed84 100644 --- a/tasktracking/tasks/models.py +++ b/tasktracking/tasks/models.py @@ -15,17 +15,10 @@ class Tag(models.Model): class Link(models.Model): nome = models.CharField(max_length=50) url = models.URLField() - def __str__(self, nome, url): + def __str__(self): self.nome self.url - def setNome(self): - return self.nome - def setUrl(self): - return self.url - def getNome(self): - return self.nome - def getUrl(self): - return self.url + class Tarefa(models.Model): STATUS_CHOICES = (