2020-10-09 22:16:27 +03:00
|
|
|
"""
|
|
|
|
Django settings for githubnavigator project.
|
|
|
|
|
|
|
|
Generated by 'django-admin startproject' using Django 3.0.8.
|
|
|
|
|
|
|
|
For more information on this file, see
|
|
|
|
https://docs.djangoproject.com/en/3.0/topics/settings/
|
|
|
|
|
|
|
|
For the full list of settings and their values, see
|
|
|
|
https://docs.djangoproject.com/en/3.0/ref/settings/
|
|
|
|
"""
|
|
|
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
# 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/3.0/howto/deployment/checklist/
|
|
|
|
|
|
|
|
# SECURITY WARNING: keep the secret key used in production secret!
|
2021-10-01 02:17:30 +03:00
|
|
|
SECRET_KEY = ")6*iyg26c9l!fvyvwd&3+vyf-dcw)e=5x2t(j)(*c29z@ykhi0"
|
2020-10-09 22:16:27 +03:00
|
|
|
|
|
|
|
# SECURITY WARNING: don't run with debug turned on in production!
|
|
|
|
DEBUG = True
|
|
|
|
|
|
|
|
ALLOWED_HOSTS = []
|
|
|
|
|
|
|
|
|
|
|
|
# Application definition
|
|
|
|
|
|
|
|
INSTALLED_APPS = [
|
2021-10-01 02:17:30 +03:00
|
|
|
"web.apps.WebConfig",
|
|
|
|
"bootstrap4",
|
|
|
|
"django.contrib.admin",
|
|
|
|
"django.contrib.auth",
|
|
|
|
"django.contrib.contenttypes",
|
|
|
|
"django.contrib.sessions",
|
|
|
|
"django.contrib.messages",
|
|
|
|
"django.contrib.staticfiles",
|
2020-10-09 22:16:27 +03:00
|
|
|
]
|
|
|
|
|
|
|
|
MIDDLEWARE = [
|
2021-10-01 02:17:30 +03:00
|
|
|
"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",
|
2020-10-09 22:16:27 +03:00
|
|
|
]
|
|
|
|
|
2021-10-01 02:17:30 +03:00
|
|
|
ROOT_URLCONF = "githubnavigator.urls"
|
2020-10-09 22:16:27 +03:00
|
|
|
|
|
|
|
TEMPLATES = [
|
|
|
|
{
|
2021-10-01 02:17:30 +03:00
|
|
|
"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",
|
2020-10-09 22:16:27 +03:00
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]
|
|
|
|
|
2021-10-01 02:17:30 +03:00
|
|
|
WSGI_APPLICATION = "githubnavigator.wsgi.application"
|
2020-10-09 22:16:27 +03:00
|
|
|
|
|
|
|
|
|
|
|
# Database
|
|
|
|
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases
|
|
|
|
|
|
|
|
DATABASES = {
|
2021-10-01 02:17:30 +03:00
|
|
|
"default": {
|
|
|
|
"ENGINE": "django.db.backends.sqlite3",
|
|
|
|
"NAME": os.path.join(BASE_DIR, "db.sqlite3"),
|
2020-10-09 22:16:27 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# Password validation
|
|
|
|
# https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators
|
|
|
|
|
|
|
|
AUTH_PASSWORD_VALIDATORS = [
|
|
|
|
{
|
2021-10-01 02:17:30 +03:00
|
|
|
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
|
2020-10-09 22:16:27 +03:00
|
|
|
},
|
|
|
|
{
|
2021-10-01 02:17:30 +03:00
|
|
|
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
|
2020-10-09 22:16:27 +03:00
|
|
|
},
|
|
|
|
{
|
2021-10-01 02:17:30 +03:00
|
|
|
"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
|
2020-10-09 22:16:27 +03:00
|
|
|
},
|
|
|
|
{
|
2021-10-01 02:17:30 +03:00
|
|
|
"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
|
2020-10-09 22:16:27 +03:00
|
|
|
},
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
# Internationalization
|
|
|
|
# https://docs.djangoproject.com/en/3.0/topics/i18n/
|
|
|
|
|
2021-10-01 02:17:30 +03:00
|
|
|
LANGUAGE_CODE = "en-us"
|
2020-10-09 22:16:27 +03:00
|
|
|
|
2021-10-01 02:17:30 +03:00
|
|
|
TIME_ZONE = "UTC"
|
2020-10-09 22:16:27 +03:00
|
|
|
|
|
|
|
USE_I18N = True
|
|
|
|
|
|
|
|
USE_L10N = True
|
|
|
|
|
|
|
|
USE_TZ = True
|
|
|
|
|
|
|
|
|
|
|
|
# Static files (CSS, JavaScript, Images)
|
|
|
|
# https://docs.djangoproject.com/en/3.0/howto/static-files/
|
|
|
|
|
2021-10-01 02:17:30 +03:00
|
|
|
STATIC_URL = "/static/"
|
2020-10-09 22:16:27 +03:00
|
|
|
|
|
|
|
# Github client settings
|
2021-10-01 02:17:30 +03:00
|
|
|
GITHUB_TOKEN = os.getenv("GITHUB_TOKEN")
|
2020-10-09 22:16:27 +03:00
|
|
|
GITHUB_REQUEST_TIMEOUT = 10
|
|
|
|
|
|
|
|
# Search settings
|
|
|
|
DEFAULT_LIMIT = 5
|
2021-10-01 02:17:30 +03:00
|
|
|
DEFAULT_QUERY = "Dependency Injector"
|
2020-10-09 22:16:27 +03:00
|
|
|
LIMIT_OPTIONS = [5, 10, 20]
|