# ImportError/ModuleNotFoundError

**URL:** <https://forum.djangoproject.com/t/importerror-modulenotfounderror/2324>\
**Category:** Getting Started\
**Created:** [May 9, 2020, 2:28am UTC](https://forum.djangoproject.com/t/importerror-modulenotfounderror/2324 "2020-05-09T02:28:54Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![amorestperpe](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/amorestperpe/32/1180_2.png) [@amorestperpe](https://forum.djangoproject.com/u/amorestperpe)\
**Post date:** [May 9, 2020, 3:24am UTC](https://forum.djangoproject.com/t/importerror-modulenotfounderror/2324/7 "2020-05-09T03:24:18Z")

</div>

import os

# Build paths inside the project like this: os.path.join(BASE\_DIR, …)

BASE\_DIR = os.path.dirname(os.path.dirname(os.path.abspath( **file** )))

# SECURITY WARNING: don’t run with debug turned on in production!

DEBUG = True

ALLOWED\_HOSTS = []

# Application definition

INSTALLED\_APPS = [  
‘polls.apps.PollsConfig’,  
‘django.contrib.admin’,  
‘django.contrib.auth’,  
‘django.contrib.contenttypes’,  
‘django.contrib.sessions’,  
‘django.contrib.messages’,  
‘django.contrib.staticfiles’,  
]

MIDDLEWARE = [  
‘django.middleware.security.SecurityMiddleware’,  
‘django.contrib.sessions.middleware.SessionMiddleware’,  
‘django.middleware.common.CommonMiddleware’,  
‘django.middleware.csrf.CsrfViewMiddleware’,  
‘django.contrib.auth.middleware.AuthenticationMiddleware’,  
‘django.contrib.messages.middleware.MessageMiddleware’,  
‘django.middleware.clickjacking.XFrameOptionsMiddleware’,  
]

ROOT\_URLCONF = ‘mysite.urls’

TEMPLATES = [  
{  
‘BACKEND’: ‘django.template.backends.django.DjangoTemplates’,  
‘DIRS’: [],  
‘APP\_DIRS’: True,  
‘OPTIONS’: {  
‘context\_processors’: [  
‘django.template.context\_processors.debug’,  
‘django.template.context\_processors.request’,  
‘django.contrib.auth.context\_processors.auth’,  
‘django.contrib.messages.context\_processors.messages’,  
],  
},  
},  
]

WSGI\_APPLICATION = ‘mysite.wsgi.application’

# Database

DATABASES = {  
‘default’: {  
‘ENGINE’: ‘django.db.backends.sqlite3’,  
‘NAME’: os.path.join(BASE\_DIR, ‘db.sqlite3’),  
}  
}

# Password validation

AUTH\_PASSWORD\_VALIDATORS = [  
{  
‘NAME’: ‘django.contrib.auth.password\_validation.UserAttributeSimilarityValidator’,  
},  
{  
‘NAME’: ‘django.contrib.auth.password\_validation.MinimumLengthValidator’,  
},  
{  
‘NAME’: ‘django.contrib.auth.password\_validation.CommonPasswordValidator’,  
},  
{  
‘NAME’: ‘django.contrib.auth.password\_validation.NumericPasswordValidator’,  
},  
]

# Internationalization

LANGUAGE\_CODE = ‘en-us’

TIME\_ZONE = ‘America/New\_York’

USE\_I18N = True

USE\_L10N = True

USE\_TZ = True

# Static files (CSS, JavaScript, Images)

STATIC\_URL = ‘/static/’

---

_[View the full topic](https://forum.djangoproject.com/t/importerror-modulenotfounderror/2324)._
