""" Django settings for buetpx_back project.
Generated by 'django-admin startproject' using Django 4.0.5.
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
BASE_DIR = Path(file).resolve().parent.parent
SECRET_KEY = 'django-insecure-9(lrarc7mt+cwh2&$gx+l4eoi11g5+8m-hs3qo)r^)g$!h6jg4'
DEBUG = True
ALLOWED_HOSTS = []
INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', 'buetpx.apps.BuetpxConfig', 'post.apps.PostConfig', 'corsheaders', 'signup_login.apps.SignupLoginConfig', 'gallery.apps.GalleryConfig', 'rest_framework.authtoken', ] REST_FRAMEWORK = { 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination', 'PAGE_SIZE': 10, 'DEFAULT_AUTHENTICATION_CLASSES': ( 'rest_framework.authentication.TokenAuthentication', ), 'DEFAULT_PERMISSION_CLASSES':( 'rest_framework.permissions.IsAuthenticated', ), }
MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', #Cors 'corsheaders.middleware.CorsMiddleware', 'django.middleware.common.CommonMiddleware', ]
CORS_ORIGIN_ALLOW_ALL = True CORS_ORIGIN_WHITELIST = ( 'http://localhost:8081', 'http://localhost:3000', )
ROOT_URLCONF = 'buetpx_back.urls'
TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], '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 = 'buetpx_back.wsgi.application'
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'buetpxdb2', 'USER': 'postgres', 'PASSWORD': '1234', 'HOST': '127.0.0.1', 'PORT': '5432', } }
PASSWORD_HASHERS = [ # 'django.contrib.auth.hashers.Brest_frameworkCryptSHA256PasswordHasher', 'django.contrib.auth.hashers.PBKDF2PasswordHasher', 'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher', 'django.contrib.auth.hashers.Argon2PasswordHasher', 'django.contrib.auth.hashers.ScryptPasswordHasher', ]
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', }, ]
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_TZ = True
STATIC_URL = 'static/'
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'