keep getting an error on there is no module

26 views
Skip to first unread message

Saeed Pooladzadeh

unread,
Jan 13, 2019, 10:28:11 AM1/13/19
to Django users

:In my Django project while I have made an app named employee. And have registered it in my apps but I keep getting this error:

No module named 'employee'

Leading to the app not being able to run properly.


please inform.

Nebojsa Hajdukovic

unread,
Jan 13, 2019, 3:03:26 PM1/13/19
to django...@googlegroups.com
when you get this error, when want to run the server?
do you have any models inside of that app? 


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7273ab19-1c0f-4e7e-9cb7-177a48da3a69%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Saeed Pooladzadeh

unread,
Jan 14, 2019, 4:25:59 PM1/14/19
to django...@googlegroups.com
When I register my app in installed apps in setting I get an error message.
When I run the server or make the migration. My Django version is 2.1.5.
What is the problem?

Saeed



Saeed Pooladzadeh

unread,
Jan 14, 2019, 8:33:35 PM1/14/19
to Django users


در یکشنبه 13 ژانویهٔ 2019، ساعت 7:28:11 (UTC-8)، Saeed Pooladzadeh نوشته:

:In my Django project while I have made an app named employee. And have registered it in my apps but I keep getting this error:

No module named 'employee'

Leading to the app not being able to run properly.

 

My Django version is 2.1.5 and and use visual studio 2017.

Here comes my setting code:

"""
Django settings for CRUD4 project.

Generated by 'django-admin startproject' using Django 1.9.1.

For more information on this file, see

For the full list of settings and their values, see
"""

import os
import posixpath

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


# Quick-start development settings - unsuitable for production

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '1f179624-7472-4502-9b5e-af7a9c44c1f2'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []


# Application definition

INSTALLED_APPS = [
    'employee',
    # Add your apps here to enable them
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
]

MIDDLEWARE_CLASSES = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'CRUD4.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 = 'CRUD4.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 = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)

STATIC_URL = '/static/'

STATIC_ROOT = posixpath.join(*(BASE_DIR.split(os.path.sep) + ['static']))


 
 
 

please inform.

 
Reply all
Reply to author
Forward
0 new messages