Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

settings.py 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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-_from-git-publicly-available-15gztxt$8-od0il2^sm6e2cm39ja&p2m43f#1_im2s+0ngt(#0'
  16. # SECURITY WARNING: don't run with debug turned on in production!
  17. DEBUG = True
  18. print("Setting py init...")
  19. ALLOWED_HOSTS = ["*"]
  20. # jxn.fredericktheinsanelygreat.com
  21. # Application definition
  22. INSTALLED_APPS = [
  23. 'channels',
  24. 'wsps',
  25. 'django.contrib.admin',
  26. 'django.contrib.auth',
  27. 'django.contrib.contenttypes',
  28. 'django.contrib.sessions',
  29. 'django.contrib.messages',
  30. 'django.contrib.staticfiles',
  31. ]
  32. MIDDLEWARE = [
  33. 'django.middleware.security.SecurityMiddleware',
  34. 'django.contrib.sessions.middleware.SessionMiddleware',
  35. 'django.middleware.common.CommonMiddleware',
  36. 'django.middleware.csrf.CsrfViewMiddleware',
  37. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  38. 'django.contrib.messages.middleware.MessageMiddleware',
  39. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  40. ]
  41. ROOT_URLCONF = 'djc_srv.urls'
  42. TEMPLATES = [
  43. {
  44. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  45. 'DIRS': [],
  46. 'APP_DIRS': True,
  47. 'OPTIONS': {
  48. 'context_processors': [
  49. 'django.template.context_processors.debug',
  50. 'django.template.context_processors.request',
  51. 'django.contrib.auth.context_processors.auth',
  52. 'django.contrib.messages.context_processors.messages',
  53. ],
  54. },
  55. },
  56. ]
  57. WSGI_APPLICATION = 'djc_srv.wsgi.application'
  58. ASGI_APPLICATION = 'djc_srv.asgi.application'
  59. CHANNEL_LAYERS = {
  60. 'default': {
  61. 'BACKEND': 'channels_redis.core.RedisChannelLayer',
  62. 'CONFIG': {
  63. "hosts": [('127.0.0.1', 6379)],
  64. "capacity": 1500, # default 100
  65. "expiry": 10, # default 60
  66. # "group_expiry": 100, # default 86400
  67. },
  68. },
  69. }
  70. # Database
  71. # https://docs.djangoproject.com/en/4.1/ref/settings/#databases
  72. DATABASES = {
  73. 'default': {
  74. 'ENGINE': 'django.db.backends.sqlite3',
  75. 'NAME': BASE_DIR / 'db.sqlite3',
  76. }
  77. }
  78. # Password validation
  79. # https://docs.djangoproject.com/en/4.1/ref/settings/#auth-password-validators
  80. AUTH_PASSWORD_VALIDATORS = [
  81. {
  82. 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  83. },
  84. {
  85. 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  86. },
  87. {
  88. 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  89. },
  90. {
  91. 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  92. },
  93. ]
  94. # Internationalization
  95. # https://docs.djangoproject.com/en/4.1/topics/i18n/
  96. LANGUAGE_CODE = 'en-us'
  97. TIME_ZONE = 'UTC'
  98. USE_I18N = True
  99. USE_TZ = True
  100. # Static files (CSS, JavaScript, Images)
  101. # https://docs.djangoproject.com/en/4.1/howto/static-files/
  102. STATIC_URL = 'static/'
  103. # Default primary key field type
  104. # https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
  105. DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'