Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- Django settings for wherefilmed project.
- Generated by 'django-admin startproject' using Django 4.0.4.
- 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
- # Application definition
- INSTALLED_APPS = [
- 'main',
- 'movies',
- 'django.contrib.admin',
- 'django.contrib.auth',
- 'django.contrib.contenttypes',
- 'django.contrib.sessions',
- 'django.contrib.messages',
- 'django.contrib.staticfiles',
- 'debug_toolbar',
- 'django_webp',
- 'django.contrib.sitemaps',
- 'sorl.thumbnail',
- ]
- # SECURITY WARNING: keep the secret key used in production secret!
- SECRET_KEY = ('django-insecure-!6%ic*pkkdkeu#-#8g3i0l2$mq$6an*)y6f-+l$823zq#5z3c7a+wo')
- #CSRF_TRUSTED_ORIGINS = ['http://wherefilmed.org/','https://wherefilmed.org/']
- # DEBUG = bool(os.environ.get('DJANGO_DEBUG', True) )
- DEBUG = True
- ALLOWED_HOSTS = ['wherefilmed.org', 'localhost']
- 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',
- 'debug_toolbar.middleware.DebugToolbarMiddleware',
- ]
- ROOT_URLCONF = 'wherefilmed.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',
- 'django_webp.context_processors.webp',
- ],
- },
- },
- ]
- WSGI_APPLICATION = 'wherefilmed.wsgi.application'
- # Database
- # https://docs.djangoproject.com/en/4.0/ref/settings/#databases
- DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.postgresql_psycopg2',
- 'NAME': 'wherefilmed',
- 'USER': 'ugrobug',
- 'PASSWORD': 'Mkm695nbv45fa8phg',
- 'HOST': 'localhost',
- 'PORT':'',
- }
- }
- # 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'
- TIME_ZONE = 'UTC'
- USE_I18N = True
- USE_TZ = True
- # Static files (CSS, JavaScript, Images)
- # https://docs.djangoproject.com/en/4.0/howto/static-files/
- STATIC_URL = '/static/'
- STATIC_ROOT = os.path.join(BASE_DIR, 'static/')
- MEDIA_URL = '/media/'
- MEDIA_ROOT = BASE_DIR / 'media'
- #STATICFILES_DIRS = [
- # BASE_DIR / "static",
- # '/var/www/wherefilmed.org/static/',
- #]
- # Default primary key field type
- # https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field
- DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
- INTERNAL_IPS = ["127.0.0.1"]
- # CORS_ORIGIN_WHITELIST = [
- # 'http://localhost:8080',
- # 'http://localhost:8081',
- # 'http://localhost:8000'
- # ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement