I am trying to add models, but whenever I run python manage.py makemigrations
I get the following error
ModuleNotFoundError: No module named 'django.contrib.staticfilesaccounts'
accounts is an app in my project, the structure of the files is as follows file structure
The models file is,
from django.db import models
# Create your models here.
class Customer(models.Model):
name=models.CharField(max_length=200, null=True)
phone=models.CharField(max_length=10, null=True)
email=models.EmailField(max_length=20, null=True)
dateCreated=models.DateField(auto_now_add=True)
def __str__(self):
return self.name
class Product(models.Model):
name=models.CharField(max_length=30, null=True)
category=models.CharField(max_length=20, null=True)
price=models.IntegerField(null=True)
def __str__(self):
return self.name
Im a Django beginner, could use some help. Much Thanks
There is a typo in INSTALLED_APPS
in the settings.py
file, it should be like this:
INSTALLED_APPS = [
# ...
'django.contrib.staticfiles',
'accounts',
#...
]