From a53a71962c1f0c8119510c2aad025c6cc9c3b087 Mon Sep 17 00:00:00 2001 From: Taciano Morais Silva Date: Thu, 12 Nov 2020 09:21:31 -0300 Subject: [PATCH] =?UTF-8?q?Corre=C3=A7=C3=B5es=20no=20Cadastrar=20Link=20#?= =?UTF-8?q?20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tasktracking/tasks/forms.py | 9 +++++++-- tasktracking/tasks/templates/base.html | 4 +++- .../tasks/templates/tasks/link/cadastrar_link.html | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tasktracking/tasks/forms.py b/tasktracking/tasks/forms.py index 62b3fe0..57427f7 100644 --- a/tasktracking/tasks/forms.py +++ b/tasktracking/tasks/forms.py @@ -1,8 +1,13 @@ from django import forms -from tasks.models import Tarefa +from tasks.models import Link, Tarefa class TarefaForm(forms.ModelForm): class Meta: model = Tarefa - fields = '__all__' \ No newline at end of file + fields = '__all__' + +class LinkForm(forms.ModelForm): + class Meta: + model = Link + fields = '__all__' diff --git a/tasktracking/tasks/templates/base.html b/tasktracking/tasks/templates/base.html index fa7b445..fc76fec 100644 --- a/tasktracking/tasks/templates/base.html +++ b/tasktracking/tasks/templates/base.html @@ -22,14 +22,16 @@ + {% block content %} {% endblock %} + diff --git a/tasktracking/tasks/templates/tasks/link/cadastrar_link.html b/tasktracking/tasks/templates/tasks/link/cadastrar_link.html index 1a24896..64c60f8 100644 --- a/tasktracking/tasks/templates/tasks/link/cadastrar_link.html +++ b/tasktracking/tasks/templates/tasks/link/cadastrar_link.html @@ -10,7 +10,7 @@ {% csrf_token %} - {% for field in form_tarefa.visible_fields %} + {% for field in form_link.visible_fields %}