python - Not able to create apps in Django -
i trying create apps in django project. have been getting error in virtual environment. if try create app out virtual env, works normally
(venv)subhash@mordor:~/backend/backend$ django-admin startapp vehicles traceback (most recent call last): file "/home/subhash/backend/venv/bin/django-admin", line 11, in <module> sys.exit(execute_from_command_line()) file "/home/subhash/backend/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line utility.execute() file "/home/subhash/backend/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 303, in execute settings.installed_apps file "/home/subhash/backend/venv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 48, in __getattr__ self._setup(name) file "/home/subhash/backend/venv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 44, in _setup self._wrapped = settings(settings_module) file "/home/subhash/backend/venv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 92, in __init__ mod = importlib.import_module(self.settings_module) file "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) importerror: no module named backend.settings.dev backend project name.
my dev.py file
from backend.settings.common import * # security warning: don't run debug turned on in production! debug = true template_debug = true allowed_hosts = ['127.0.0.1'] # database # https://docs.djangoproject.com/en/1.8/ref/settings/#databases databases = { 'default': { 'engine': 'django.db.backends.postgresql_psycopg2', 'name': 'django', 'user': 'tech', 'password': 'tech', 'host': 'localhost', 'port': '5432', } } # static files (css, javascript, images) # https://docs.djangoproject.com/en/1.6/howto/static-files/ static_url = '/static/'
try:
django-admin.py startapp vehicles
Comments
Post a Comment