2

Every time I try to run my program using python manage.py runserver, this same error comes up:

"ModuleNotFoundError: No module named 'django.contrib.staticfilesbase'"

The Amateur Coder
  • 789
  • 3
  • 11
  • 33

1 Answers1

1

This error typically means that while trying to run your app, either your code or your dependencies is telling django to look for django.contrib.staticfilesbase and my best guess is that it is your code.

Start with your settings.py. Open it and look under the installed apps. It should look at least something like this:

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles', #this is probably where the mistake is
]

You can have other app under the "installed apps" ofcourse, but if you find django.contrib.staticfilesbase in there, change it to django.contrib.staticfiles.

ouflak
  • 2,458
  • 10
  • 44
  • 49
Ibrahim
  • 67
  • 1
  • 9