I am following a tutorial online for a to-do app using Django, but I keep getting this error.
File “C:\DjangoStuff\my_app\todo_app\urls.py”, line 3, in from todo_list import views File “C:\DjangoStuff\my_app\todo_list\views.py”, line 3, in from .forms import ListForm ModuleNotFoundError: No module named ‘todo_list.forms’
I have tried deleting and adding back the forms.py file, but no success. The todo_list folder does contain all the files being referenced as far as I can tell.
I have a todo_list folder where all the below mentioned files are stored
This is the code I have imported in the urls.py file:
from django.urls import path
from . import views
in the views.py file, I have the following imported:
from django.shortcuts import render, redirect
from .models import List
from .forms import ListForm
from django.contrib import messages
from django.http import HttpResponseRedirect
I have also created the models.py file and forms.py files as part of the todo_list folder.
I'ms sure it's something simple but have been through the tutorial many times and cannot find anything wrong...