简体   繁体   中英

python manage.py runserver - Error: no module named registration

I am attempting to run python manage.py runserver to start the development server and I receive the following error:

Error: no module named registration

In my common.py file I have under installed apps "registration".

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'rosetta',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
'templatetag_handlebars',
'registration',
'appName.common',
'appName.users',
'appName.core',

)

I think this may be the culprit, but cannot be sure.

Can anyone tell me what I have done and how to fix it?

Thanks.

Open python shell and do this:

import sys

sys.path.append('/your_registration_package_path')

you might forgot add registration package to your python sys path

import sys
sys.path.append('/your_path')

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM