removing unnecessary files
This commit is contained in:
1 parent
72e57139bc
commit
d4e1c7f7e4
2 files changed
-432
No files matched your search
@@ -1,216 +0,0 @@
|
||||
"""
|
||||
Django settings for lottopy_site project.
|
||||
|
||||
Generated by 'django-admin startproject' using Django 4.0.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/4.0/topics/settings/
|
||||
|
||||
For the full list of settings and their values, see
|
||||
https://docs.djangoproject.com/en/4.0/ref/settings/
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
import os
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
#SECRET_KEY = 'EAT A DICK MY SITE IS SECURE'
|
||||
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY')
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
#DEBUG = os.environ.get('DJANGO_DEBUG', 'True') == 'True'
|
||||
DEBUG = False
|
||||
ADMINS = [('Matteo', 'clichemail1@gmail.com')]
|
||||
|
||||
#ALLOWED_HOSTS = ['localhost', '127.0.0.1', '[::1]', '23.92.22.47:8000']
|
||||
ALLOWED_HOSTS = ['wvlotterypredictor.xyz','www.wvlotterypredictor.xyz', 'localhost', '127.0.0.1', '192.168.0.123']
|
||||
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'lottopy.apps.LottopyConfig',
|
||||
#'blog.apps.BlogConfig',
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
"whitenoise.runserver_nostatic",
|
||||
"django.contrib.staticfiles",
|
||||
#'ckeditor',
|
||||
'crispy_forms',
|
||||
'crispy_bootstrap4',
|
||||
'django.contrib.sitemaps',
|
||||
'corsheaders',
|
||||
'django.contrib.sites',
|
||||
#'django_cleanup.apps.CleanupConfig',
|
||||
]
|
||||
|
||||
SITE_ID = 1
|
||||
|
||||
MIDDLEWARE = [
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'corsheaders.middleware.CorsMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
'whitenoise.middleware.WhiteNoiseMiddleware',
|
||||
]
|
||||
|
||||
ROOT_URLCONF = 'lottopy_site.urls'
|
||||
SESSION_COOKIE_SECURE = True
|
||||
CSRF_COOKIE_SECURE = True
|
||||
CSRF_TRUSTED_ORIGINS = ['https://wvlotterypredictor.xyz', 'https://www.wvlotterypredictor.xyz']
|
||||
CORS_ALLOW_ALL_ORIGINS = True
|
||||
|
||||
# HSTS Setting for Cloudflare
|
||||
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
||||
|
||||
# Templates Directory
|
||||
TEMPLATE_DIR = os.path.join(BASE_DIR,"templates")
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [TEMPLATE_DIR,os.path.join(TEMPLATE_DIR,'lottopy')],
|
||||
'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 = 'lottopy_site.wsgi.application'
|
||||
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': BASE_DIR / 'db.sqlite3',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/4.0/ref/settings/#auth-password-validators
|
||||
|
||||
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
|
||||
# https://docs.djangoproject.com/en/4.0/topics/i18n/
|
||||
|
||||
LANGUAGE_CODE = 'en-us'
|
||||
|
||||
TIME_ZONE = 'UTC'
|
||||
|
||||
USE_I18N = True
|
||||
|
||||
USE_TZ = True
|
||||
|
||||
CRISPY_ALLOWED_TEMPLATE_PACKS = 'bootstrap4'
|
||||
CRISPY_TEMPLATE_PACK = 'bootstrap4'
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/4.0/howto/static-files/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
STATIC_ROOT = "/home/williedynamite/django_lottopy/lottopy_site/staticfiles"
|
||||
|
||||
STATICFILES_DIRS = [
|
||||
#os.path.join(BASE_DIR, "static"),
|
||||
'/home/williedynamite/django_lottopy/lottopy_site/static',
|
||||
#'/home/williedynamite/django_lottopy/lottopy_site/lottopy/static',
|
||||
]
|
||||
|
||||
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
|
||||
|
||||
# Default primary key field type
|
||||
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
|
||||
#CKEDITOR_BASEPATH='/static/ckeditor/'
|
||||
#CKEDITOR_UPLOAD_PATH = "uploads/"
|
||||
|
||||
|
||||
# Redis
|
||||
#REDIS_HOST = 'localhost'
|
||||
#REDIS_PORT = 6379
|
||||
CACHES = {
|
||||
'default': {
|
||||
'BACKEND': 'django.core.cache.backends.redis.RedisCache',
|
||||
'LOCATION': 'redis://127.0.0.1:6379/2',
|
||||
}
|
||||
}
|
||||
CACHE_TTL = 60 * 60 * 24
|
||||
|
||||
CELERY_BROKER_URL = 'redis://localhost:6379/0'
|
||||
CELERY_RESULT_BACKEND = "redis://localhost:6379/1"
|
||||
CELERY_TIMEZONE = "America/Eastern"
|
||||
CELERY_TASK_TRACK_STARTED = True
|
||||
#CELERY_TASK_TIME_LIMIT = 30 * 60
|
||||
|
||||
# DataFlair #Logging Information
|
||||
LOGGING = {
|
||||
'version': 1,
|
||||
# Version of logging
|
||||
'disable_existing_loggers': False,
|
||||
#disable logging
|
||||
## Handlers #############################################################
|
||||
'handlers': {
|
||||
'file': {
|
||||
'level': 'DEBUG',
|
||||
'class': 'logging.FileHandler',
|
||||
'filename': 'dataflair-debug.log',
|
||||
},
|
||||
########################################################################
|
||||
'console': {
|
||||
'class': 'logging.StreamHandler',
|
||||
},
|
||||
},
|
||||
## Loggers ####################################################################
|
||||
'loggers': {
|
||||
'django': {
|
||||
'handlers': ['file', 'console'],
|
||||
'level': os.getenv('DJANGO_LOG_LEVEL', 'DEBUG'),
|
||||
'propagate': True,
|
||||
},
|
||||
'django.template': {
|
||||
'handlers': ['console'],
|
||||
'level': 'WARNING',
|
||||
'propagate': False,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,216 +0,0 @@
|
||||
"""
|
||||
Django settings for lottopy_site project.
|
||||
|
||||
Generated by 'django-admin startproject' using Django 4.0.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/4.0/topics/settings/
|
||||
|
||||
For the full list of settings and their values, see
|
||||
https://docs.djangoproject.com/en/4.0/ref/settings/
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
import os
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
#SECRET_KEY = 'EAT A DICK MY SITE IS SECURE'
|
||||
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY')
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
#DEBUG = os.environ.get('DJANGO_DEBUG', 'True') == 'True'
|
||||
DEBUG = False
|
||||
ADMINS = [('Matteo', 'clichemail1@gmail.com')]
|
||||
|
||||
#ALLOWED_HOSTS = ['localhost', '127.0.0.1', '[::1]', '23.92.22.47:8000']
|
||||
ALLOWED_HOSTS = ['wvlotterypredictor.xyz','www.wvlotterypredictor.xyz', 'localhost', '127.0.0.1', '192.168.0.123']
|
||||
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'lottopy.apps.LottopyConfig',
|
||||
#'blog.apps.BlogConfig',
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
"whitenoise.runserver_nostatic",
|
||||
"django.contrib.staticfiles",
|
||||
#'ckeditor',
|
||||
'crispy_forms',
|
||||
'crispy_bootstrap4',
|
||||
'django.contrib.sitemaps',
|
||||
'corsheaders',
|
||||
'django.contrib.sites',
|
||||
#'django_cleanup.apps.CleanupConfig',
|
||||
]
|
||||
|
||||
SITE_ID = 1
|
||||
|
||||
MIDDLEWARE = [
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'corsheaders.middleware.CorsMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
'whitenoise.middleware.WhiteNoiseMiddleware',
|
||||
]
|
||||
|
||||
ROOT_URLCONF = 'lottopy_site.urls'
|
||||
SESSION_COOKIE_SECURE = True
|
||||
CSRF_COOKIE_SECURE = True
|
||||
CSRF_TRUSTED_ORIGINS = ['https://wvlotterypredictor.xyz', 'https://www.wvlotterypredictor.xyz']
|
||||
CORS_ALLOW_ALL_ORIGINS = True
|
||||
|
||||
# HSTS Setting for Cloudflare
|
||||
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
||||
|
||||
# Templates Directory
|
||||
TEMPLATE_DIR = os.path.join(BASE_DIR,"templates")
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [TEMPLATE_DIR,os.path.join(TEMPLATE_DIR,'lottopy')],
|
||||
'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 = 'lottopy_site.wsgi.application'
|
||||
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': BASE_DIR / 'db.sqlite3',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/4.0/ref/settings/#auth-password-validators
|
||||
|
||||
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
|
||||
# https://docs.djangoproject.com/en/4.0/topics/i18n/
|
||||
|
||||
LANGUAGE_CODE = 'en-us'
|
||||
|
||||
TIME_ZONE = 'UTC'
|
||||
|
||||
USE_I18N = True
|
||||
|
||||
USE_TZ = True
|
||||
|
||||
CRISPY_ALLOWED_TEMPLATE_PACKS = 'bootstrap4'
|
||||
CRISPY_TEMPLATE_PACK = 'bootstrap4'
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/4.0/howto/static-files/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
STATIC_ROOT = "/home/williedynamite/django_lottopy/lottopy_site/staticfiles"
|
||||
|
||||
STATICFILES_DIRS = [
|
||||
#os.path.join(BASE_DIR, "static"),
|
||||
'/home/williedynamite/django_lottopy/lottopy_site/static',
|
||||
#'/home/williedynamite/django_lottopy/lottopy_site/lottopy/static',
|
||||
]
|
||||
|
||||
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
|
||||
|
||||
# Default primary key field type
|
||||
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
|
||||
#CKEDITOR_BASEPATH='/static/ckeditor/'
|
||||
#CKEDITOR_UPLOAD_PATH = "uploads/"
|
||||
|
||||
|
||||
# Redis
|
||||
#REDIS_HOST = 'localhost'
|
||||
#REDIS_PORT = 6379
|
||||
CACHES = {
|
||||
'default': {
|
||||
'BACKEND': 'django.core.cache.backends.redis.RedisCache',
|
||||
'LOCATION': 'redis://127.0.0.1:6379',
|
||||
}
|
||||
}
|
||||
CACHE_TTL = 60 * 60 * 24
|
||||
|
||||
CELERY_BROKER_URL = 'redis://localhost:6379/0'
|
||||
CELERY_RESULT_BACKEND = "redis://localhost:6379/1"
|
||||
CELERY_TIMEZONE = "America/Eastern"
|
||||
CELERY_TASK_TRACK_STARTED = True
|
||||
#CELERY_TASK_TIME_LIMIT = 30 * 60
|
||||
|
||||
# DataFlair #Logging Information
|
||||
LOGGING = {
|
||||
'version': 1,
|
||||
# Version of logging
|
||||
'disable_existing_loggers': False,
|
||||
#disable logging
|
||||
## Handlers #############################################################
|
||||
'handlers': {
|
||||
'file': {
|
||||
'level': 'DEBUG',
|
||||
'class': 'logging.FileHandler',
|
||||
'filename': 'dataflair-debug.log',
|
||||
},
|
||||
########################################################################
|
||||
'console': {
|
||||
'class': 'logging.StreamHandler',
|
||||
},
|
||||
},
|
||||
## Loggers ####################################################################
|
||||
'loggers': {
|
||||
'django': {
|
||||
'handlers': ['file', 'console'],
|
||||
'level': os.getenv('DJANGO_LOG_LEVEL', 'DEBUG'),
|
||||
'propagate': True,
|
||||
},
|
||||
'django.template': {
|
||||
'handlers': ['console'],
|
||||
'level': 'WARNING',
|
||||
'propagate': False,
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user