attempting to resolve setting configuration errors
parent
99d5406a47
commit
43aad3ead9
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -11,6 +11,6 @@ import os
|
||||||
|
|
||||||
from django.core.asgi import get_asgi_application
|
from django.core.asgi import get_asgi_application
|
||||||
|
|
||||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'bookshelf_management.settings')
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE','bookshelf_management.settings.settings_base')
|
||||||
|
|
||||||
application = get_asgi_application()
|
application = get_asgi_application()
|
||||||
|
|
|
@ -14,14 +14,14 @@ import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
#BASE_DIR = Path(__file__).resolve().parent.parent
|
||||||
|
|
||||||
# Quick-start development settings - unsuitable for production
|
# Quick-start development settings - unsuitable for production
|
||||||
# See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
|
# See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
|
||||||
|
|
||||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||||
|
|
||||||
#BASE_DIR = os.path.dirname(os.path.dirname(__file__))
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
|
||||||
|
|
||||||
# use environment variable to set DJANGO_SECRET_KEY
|
# use environment variable to set DJANGO_SECRET_KEY
|
||||||
#SECRET_KEY = os.environ['DJANGO_SECRET_KEY']
|
#SECRET_KEY = os.environ['DJANGO_SECRET_KEY']
|
||||||
|
@ -33,10 +33,11 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
||||||
SECRET_KEY = 'zgwvzeb!oca99v&c(=lljl)y_&^33dwoqs@%)arujer_#x(#gn'
|
SECRET_KEY = 'zgwvzeb!oca99v&c(=lljl)y_&^33dwoqs@%)arujer_#x(#gn'
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = False
|
DEBUG = True
|
||||||
|
|
||||||
ALLOWED_HOSTS = [
|
ALLOWED_HOSTS = [
|
||||||
'localhost'
|
'localhost',
|
||||||
|
'127.0.0.1'
|
||||||
]
|
]
|
||||||
|
|
||||||
# Application definition
|
# Application definition
|
|
@ -0,0 +1,3 @@
|
||||||
|
from settings_base import *
|
||||||
|
|
||||||
|
DEBUG = False
|
|
@ -11,6 +11,6 @@ import os
|
||||||
|
|
||||||
from django.core.wsgi import get_wsgi_application
|
from django.core.wsgi import get_wsgi_application
|
||||||
|
|
||||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'bookshelf_management.settings')
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE','bookshelf_management.settings.settings_base')
|
||||||
|
|
||||||
application = get_wsgi_application()
|
application = get_wsgi_application()
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import bookshelf_management.settings.py
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE','bookshelf_management.settings.settings_base')
|
||||||
from django.core.management import execute_from_command_line
|
from django.core.management import execute_from_command_line
|
||||||
execute_from_command_line(sys.argv)
|
execute_from_command_line(sys.argv)
|
||||||
|
|
||||||
|
@ -13,7 +13,8 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#sys.path.append("/mnt/c/Users/damon/Desktop/bookshelf-management/bookshelf_management/bookshelf_management/settings")
|
||||||
|
#export DJANGO_SETTINGS_MODULE=bookshelf_management.settings
|
||||||
'''
|
'''
|
||||||
try:
|
try:
|
||||||
from django.core.management import execute_from_command_line
|
from django.core.management import execute_from_command_line
|
||||||
|
|
|
@ -75,3 +75,6 @@ if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
|
||||||
hash -r
|
hash -r
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#DJANGO_SETTINGS_MODULE="/mnt/c/Users/damon/Desktop/bookshelf-management/bookshelf_management/bookshelf_management/settings/settings_base.py"
|
||||||
|
#export DJANGO_SETTINGS_MODULE
|
|
@ -1,12 +1,8 @@
|
||||||
#!/mnt/c/users/damon/desktop/bookshelf-management/my_env/bin/python3
|
#!/mnt/c/users/damon/desktop/bookshelf-management/my_env/bin/python3
|
||||||
# EASY-INSTALL-ENTRY-SCRIPT: 'Django','console_scripts','django-admin'
|
# -*- coding: utf-8 -*-
|
||||||
__requires__ = 'Django'
|
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
from pkg_resources import load_entry_point
|
from django.core.management import execute_from_command_line
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
|
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||||
sys.exit(
|
sys.exit(execute_from_command_line())
|
||||||
load_entry_point('Django', 'console_scripts', 'django-admin')()
|
|
||||||
)
|
|
||||||
|
|
|
@ -1,7 +1,21 @@
|
||||||
#!/mnt/c/users/damon/desktop/bookshelf-management/my_env/bin/python3
|
#!/mnt/c/users/damon/desktop/bookshelf-management/my_env/bin/python3
|
||||||
# EASY-INSTALL-DEV-SCRIPT: 'Django==3.2','django-admin.py'
|
# When the django-admin.py deprecation ends, remove this script.
|
||||||
__requires__ = 'Django==3.2'
|
import warnings
|
||||||
__import__('pkg_resources').require('Django==3.2')
|
|
||||||
__file__ = '/mnt/c/users/damon/desktop/bookshelf-management/django/django/bin/django-admin.py'
|
from django.core import management
|
||||||
with open(__file__) as f:
|
|
||||||
exec(compile(f.read(), __file__, 'exec'))
|
try:
|
||||||
|
from django.utils.deprecation import RemovedInDjango40Warning
|
||||||
|
except ImportError:
|
||||||
|
raise ImportError(
|
||||||
|
'django-admin.py was deprecated in Django 3.1 and removed in Django '
|
||||||
|
'4.0. Please manually remove this script from your virtual environment '
|
||||||
|
'and use django-admin instead.'
|
||||||
|
)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
warnings.warn(
|
||||||
|
'django-admin.py is deprecated in favor of django-admin.',
|
||||||
|
RemovedInDjango40Warning,
|
||||||
|
)
|
||||||
|
management.execute_from_command_line()
|
||||||
|
|
Loading…
Reference in New Issue