From a20331a2b3f7953ae4a1149edf2eb4b45af2a28b Mon Sep 17 00:00:00 2001 From: = Date: Sat, 18 Jan 2025 15:54:15 -0500 Subject: [PATCH] create templates --- main/views.py | 6 ++++-- .../templates}/create_project.html | 0 .../templates}/create_task.html | 0 .../templates}/load_project.html | 0 {templates => project_management/templates}/login.html | 0 .../templates}/project_dashboard.html | 0 {templates => project_management/templates}/welcome.html | 0 7 files changed, 4 insertions(+), 2 deletions(-) rename {templates => project_management/templates}/create_project.html (100%) rename {templates => project_management/templates}/create_task.html (100%) rename {templates => project_management/templates}/load_project.html (100%) rename {templates => project_management/templates}/login.html (100%) rename {templates => project_management/templates}/project_dashboard.html (100%) rename {templates => project_management/templates}/welcome.html (100%) diff --git a/main/views.py b/main/views.py index b8e660e..c4e7fe0 100644 --- a/main/views.py +++ b/main/views.py @@ -3,12 +3,14 @@ from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from .models import Project, Task from .forms import ProjectForm, TaskForm + from django.http import HttpResponse from django.template import loader def welcome_page(request): - template = loader.get_template("login.html") - return HttpResponse(template.render({},request)) + template = loader.get_template('login.html') + return HttpResponse(template.render()) + # create project @login_required diff --git a/templates/create_project.html b/project_management/templates/create_project.html similarity index 100% rename from templates/create_project.html rename to project_management/templates/create_project.html diff --git a/templates/create_task.html b/project_management/templates/create_task.html similarity index 100% rename from templates/create_task.html rename to project_management/templates/create_task.html diff --git a/templates/load_project.html b/project_management/templates/load_project.html similarity index 100% rename from templates/load_project.html rename to project_management/templates/load_project.html diff --git a/templates/login.html b/project_management/templates/login.html similarity index 100% rename from templates/login.html rename to project_management/templates/login.html diff --git a/templates/project_dashboard.html b/project_management/templates/project_dashboard.html similarity index 100% rename from templates/project_dashboard.html rename to project_management/templates/project_dashboard.html diff --git a/templates/welcome.html b/project_management/templates/welcome.html similarity index 100% rename from templates/welcome.html rename to project_management/templates/welcome.html