You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

settings.py 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. """
  2. Django settings for djc_srv project.
  3. Generated by 'django-admin startproject' using Django 4.1.
  4. For more information on this file, see
  5. https://docs.djangoproject.com/en/4.1/topics/settings/
  6. For the full list of settings and their values, see
  7. https://docs.djangoproject.com/en/4.1/ref/settings/
  8. """
  9. from pathlib import Path
  10. # Build paths inside the project like this: BASE_DIR / 'subdir'.
  11. BASE_DIR = Path(__file__).resolve().parent.parent
  12. # Quick-start development settings - unsuitable for production
  13. # See https://docs.djangoproject.com/en/4.1/howto/deployment/checklist/
  14. # SECURITY WARNING: keep the secret key used in production secret!
  15. SECRET_KEY = 'django-insecure-5cp!_$khwb!!+#4&%b0s=qx@jo95t9^%wtny-s!2zd&t-)ba+r'
  16. # SECURITY WARNING: don't run with debug turned on in production!
  17. DEBUG = True
  18. # ALLOWED_HOSTS = ["fredericktheinsanelygreat.com","*.fredericktheinsanelygreat.com","jxn.fredericktheinsanelygreat.com"]
  19. ALLOWED_HOSTS = ["*"]
  20. # ALLOWED_HOSTS = ["fredericktheinsanelygreat.com","jxn.fredericktheinsanelygreat.com"]
  21. # jxn.fredericktheinsanelygreat.com
  22. # Application definition
  23. INSTALLED_APPS = [
  24. 'channels',
  25. 'wsps',
  26. 'django.contrib.admin',
  27. 'django.contrib.auth',
  28. 'django.contrib.contenttypes',
  29. 'django.contrib.sessions',
  30. 'django.contrib.messages',
  31. 'django.contrib.staticfiles',
  32. ]
  33. MIDDLEWARE = [
  34. 'django.middleware.security.SecurityMiddleware',
  35. 'django.contrib.sessions.middleware.SessionMiddleware',
  36. 'django.middleware.common.CommonMiddleware',
  37. 'django.middleware.csrf.CsrfViewMiddleware',
  38. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  39. 'django.contrib.messages.middleware.MessageMiddleware',
  40. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  41. ]
  42. ROOT_URLCONF = 'djc_srv.urls'
  43. TEMPLATES = [
  44. {
  45. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  46. 'DIRS': [],
  47. 'APP_DIRS': True,
  48. 'OPTIONS': {
  49. 'context_processors': [
  50. 'django.template.context_processors.debug',
  51. 'django.template.context_processors.request',
  52. 'django.contrib.auth.context_processors.auth',
  53. 'django.contrib.messages.context_processors.messages',
  54. ],
  55. },
  56. },
  57. ]
  58. WSGI_APPLICATION = 'djc_srv.wsgi.application'
  59. ASGI_APPLICATION = 'djc_srv.asgi.application'
  60. CHANNEL_LAYERS = {
  61. 'default': {
  62. 'BACKEND': 'channels_redis.core.RedisChannelLayer',
  63. 'CONFIG': {
  64. "hosts": [('127.0.0.1', 6379)],
  65. "capacity": 1500, # default 100
  66. "expiry": 10, # default 60
  67. # "group_expiry": 100, # default 86400
  68. },
  69. },
  70. }
  71. # Database
  72. # https://docs.djangoproject.com/en/4.1/ref/settings/#databases
  73. DATABASES = {
  74. 'default': {
  75. 'ENGINE': 'django.db.backends.sqlite3',
  76. 'NAME': BASE_DIR / 'db.sqlite3',
  77. }
  78. }
  79. # Password validation
  80. # https://docs.djangoproject.com/en/4.1/ref/settings/#auth-password-validators
  81. AUTH_PASSWORD_VALIDATORS = [
  82. {
  83. 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  84. },
  85. {
  86. 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  87. },
  88. {
  89. 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  90. },
  91. {
  92. 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  93. },
  94. ]
  95. # Internationalization
  96. # https://docs.djangoproject.com/en/4.1/topics/i18n/
  97. LANGUAGE_CODE = 'en-us'
  98. TIME_ZONE = 'UTC'
  99. USE_I18N = True
  100. USE_TZ = True
  101. # Static files (CSS, JavaScript, Images)
  102. # https://docs.djangoproject.com/en/4.1/howto/static-files/
  103. STATIC_URL = 'static/'
  104. # Default primary key field type
  105. # https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
  106. DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'