From 26865f8e985e0eab81c5ffd5acac81c6d7146128 Mon Sep 17 00:00:00 2001 From: Patricio Cornejo Date: Thu, 22 May 2025 22:22:08 -0400 Subject: [PATCH 1/2] primer git con datos ok de ejemplos --- tasks/forms.py | 11 ++++-- tasks/templates/_navbar.html | 4 +-- tasks/templates/create_task.html | 22 ++++++++---- tasks/templates/home.html | 25 ++++++++++--- tasks/templates/signin.html | 37 +++++++++++++------ tasks/templates/signup.html | 41 ++++++++++++++------- tasks/templates/task_detail.html | 61 ++++++++++++++++++-------------- tasks/templates/tasks.html | 40 ++++++++++++--------- 8 files changed, 157 insertions(+), 84 deletions(-) diff --git a/tasks/forms.py b/tasks/forms.py index 4f39411b..c844565b 100644 --- a/tasks/forms.py +++ b/tasks/forms.py @@ -1,7 +1,12 @@ -from django.forms import ModelForm +from django import forms from .models import Task -class TaskForm(ModelForm): +class TaskForm(forms.ModelForm): class Meta: model = Task - fields = ['title', 'description', 'important'] \ No newline at end of file + fields = ['title', 'description', 'important'] + widgets = { + 'title': forms.TextInput(attrs={'class':'form-control','placeholder':'Escriba el titulo'}), + 'description': forms.Textarea(attrs={'class':'form-control','placeholder':'Escriba la descripcion'}), + 'important': forms.CheckboxInput(attrs={'class':'form-check-input m-auto'}), + } \ No newline at end of file diff --git a/tasks/templates/_navbar.html b/tasks/templates/_navbar.html index db0e7f67..b9b0cd0d 100644 --- a/tasks/templates/_navbar.html +++ b/tasks/templates/_navbar.html @@ -1,6 +1,6 @@