Update day 16

Signed-off-by: Manuel Vergara <manuel@vergaracarmona.es>
This commit is contained in:
2023-05-27 18:07:33 +02:00
parent 374f2e5276
commit 376742e0a3
10 changed files with 110 additions and 4 deletions

View File

@@ -1,3 +1,6 @@
{% extends 'base/principal.html' %}
{% block content %}
<h1>Ingresar</h1>
<form method="post" action="">
@@ -9,3 +12,5 @@
</form>
<p>¿No tienes cuenta?<a href="{% url 'registro' %}">Registrate</a></p>
{% endblock content %}

View File

@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title>Lista de Pendientes</title>
<style>
body {
background-color: aqua;
}
</style>
</head>
<body>
<div class="container">
{% block content %}
{% endblock content %}
</div>
</body>
</html>

View File

@@ -1,3 +1,6 @@
{% extends 'base/principal.html' %}
{% block content %}
<h1>Registro</h1>
<form method="post" action="">
@@ -8,4 +11,6 @@
</form>
<p>Ya tienes cuenta?<a href="{% url 'login' %}">Registrate</a></p>
<p>Ya tienes cuenta?<a href="{% url 'login' %}">Login</a></p>
{% endblock content %}

View File

@@ -1,2 +1,6 @@
{% extends 'base/principal.html' %}
{% block content %}
<h1>Tarea: {{tarea}} </h1>
{% endblock content %}

View File

@@ -1,3 +1,5 @@
{% extends 'base/principal.html' %}
{% block content %}
<a href="{% url 'tareas' %}">Volver</a>
@@ -6,3 +8,5 @@
<p>Vas a eliminar esta tarea: "{{tarea}}"</p>
<input type="submit" value="Eliminar">
</form>
{% endblock content %}

View File

@@ -1,3 +1,6 @@
{% extends 'base/principal.html' %}
{% block content %}
<h1>Formulario de tareas</h1>
<a href="{% url 'tareas' %}">Volver</a>
@@ -7,3 +10,5 @@
{{form.as_p}}
<input type="submit" value="Enviar">
</form>
{% endblock content %}

View File

@@ -1,3 +1,7 @@
{% extends 'base/principal.html' %}
{% block content %}
{% if request.user.is_authenticated %}
<p>
{{request.user}}
@@ -36,7 +40,6 @@
<tr>
<td>{{ tarea.titulo }}</td>
<td><a href="{% url 'tarea' tarea.id %}">Ver</a></td>
<td><a href="{% url 'editar-tarea' tarea.id %}">Editar</a></td>
<td><a href="{% url 'eliminar-tarea' tarea.id %}">Eliminar</a></td>
</tr>
@@ -47,3 +50,7 @@
{% endfor %}
</table>
{% endblock content %}

View File

@@ -38,7 +38,8 @@ class PaginaRegistro(FormView):
def get(self, *args, **kwargs):
if self.request.user.is_authenticated:
return redirect('tareas')
return super(PaginaRegistro, self.get(*args, **kwargs))
return super(PaginaRegistro, self).get(*args, **kwargs)
class ListaPendientes(LoginRequiredMixin, ListView):