Re: how can i fix ImportError: No module named 'archive.settings'

2017-07-05 Thread Antonis Christofides
Hi,

The most likely explanation is that your settings file has the wrong name or
location. It should be "settings.py", and it should be in the "archive" 
directory.

"archive" should not normally be in INSTALLED_APPS, unless you really know what
you are doing, which you probably don't (yet). By default Django has a "project"
subdirectory and "apps" directories; settings.py in in the "project"
subdirectory and the "apps" directories are apps that are specified in
INSTALLED_APPS.

Regards,

Antonis

Antonis Christofides
http://djangodeployment.com

On 2017-07-05 02:27, Body Abdo wrote:
> python manage.py runserver
> Traceback (most recent call last):
>   File "manage.py", line 22, in 
> execute_from_command_line(sys.argv)
>   File
> "/var/www/project/venv/lib/python3.5/site-packages/django/core/management/__init__.py",
> line 363, in execute_from_command_line
> utility.execute()
>   File
> "/var/www/project/venv/lib/python3.5/site-packages/django/core/management/__init__.py",
> line 307, in execute
> settings.INSTALLED_APPS
>   File
> "/var/www/project/venv/lib/python3.5/site-packages/django/conf/__init__.py",
> line 56, in __getattr__
> self._setup(name)
>   File
> "/var/www/project/venv/lib/python3.5/site-packages/django/conf/__init__.py",
> line 41, in _setup
> self._wrapped = Settings(settings_module)
>   File
> "/var/www/project/venv/lib/python3.5/site-packages/django/conf/__init__.py",
> line 110, in __init__
> mod = importlib.import_module(self.SETTINGS_MODULE)
>   File "/var/www/project/venv/lib64/python3.5/importlib/__init__.py", line
> 126, in import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 986, in _gcd_import
>   File "", line 969, in _find_and_load
>   File "", line 956, in _find_and_load_unlocked
> ImportError: No module named 'archive.settings'
>
>
> *my setting:*
> import os
> import sys
>
> # 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 # See
> https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ # SECURITY
> WARNING: keep the secret key used in production secret! SECRET_KEY = 
> 'd*d9q(5zn)6uv9ep$-qjsh3e^63=n64j%s&*w#*1voa3+e$x' # SECURITY WARNING: don't
> run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = []
>
> IMPORT_EXPORT_USE_TRANSACTIONS = True # Application definition INSTALLED_APPS 
> = [
> 'archive', 'import_export', 'django.contrib.admin', 'django.contrib.auth',
> 'django.contrib.contenttypes', 'django.contrib.sessions',
> 'django.contrib.messages', 'django.contrib.staticfiles', 'bootstrap3',
> -- 
> 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+unsubscr...@googlegroups.com
> .
> To post to this group, send email to django-users@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/60c53c4a-3b34-4564-8bbf-b3e292ea16b1%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/e63da83f-6586-00e6-4740-b31a37bdcdc9%40djangodeployment.com.
For more options, visit https://groups.google.com/d/optout.


Re: how can i fix ImportError: No module named 'archive.settings'

2017-07-04 Thread James Schneider
  File "", line 969, in _find_and_load
  File "", line 956, in _find_and_load_unlocked
ImportError: No module named 'archive.settings'


If I had to guess, you're missing the settings.py file in the root of your
Django project. That should have been created by the 'django-admin.py
startproject' command.

-James

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/CA%2Be%2BciX_4c3NQ6hK5n1OUv64wFMGr%2BLrexCioC%3Dj%2BLDsyuNzsA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


how can i fix ImportError: No module named 'archive.settings'

2017-07-04 Thread Body Abdo
python manage.py runserver
Traceback (most recent call last):
  File "manage.py", line 22, in 
execute_from_command_line(sys.argv)
  File 
"/var/www/project/venv/lib/python3.5/site-packages/django/core/management/__init__.py",
 
line 363, in execute_from_command_line
utility.execute()
  File 
"/var/www/project/venv/lib/python3.5/site-packages/django/core/management/__init__.py",
 
line 307, in execute
settings.INSTALLED_APPS
  File 
"/var/www/project/venv/lib/python3.5/site-packages/django/conf/__init__.py", 
line 56, in __getattr__
self._setup(name)
  File 
"/var/www/project/venv/lib/python3.5/site-packages/django/conf/__init__.py", 
line 41, in _setup
self._wrapped = Settings(settings_module)
  File 
"/var/www/project/venv/lib/python3.5/site-packages/django/conf/__init__.py", 
line 110, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/var/www/project/venv/lib64/python3.5/importlib/__init__.py", line 
126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 986, in _gcd_import
  File "", line 969, in _find_and_load
  File "", line 956, in _find_and_load_unlocked
ImportError: No module named 'archive.settings'


*my setting:*

import os
import sys

# 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
# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'd*d9q(5zn)6uv9ep$-qjsh3e^63=n64j%s&*w#*1voa3+e$x'

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

ALLOWED_HOSTS = []

IMPORT_EXPORT_USE_TRANSACTIONS = True

# Application definition

INSTALLED_APPS = [
'archive',
'import_export',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'bootstrap3',

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/60c53c4a-3b34-4564-8bbf-b3e292ea16b1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.