|
|
|
|
@ -24,9 +24,9 @@ BASE_DIR = Path(__file__).resolve().parent.parent |
|
|
|
|
SECRET_KEY = 'django-insecure-fw*y$0ozm)bmmm+e6(0d#+j7m(@(etgr@012g5%3@jsn3jtl1u' |
|
|
|
|
|
|
|
|
|
# SECURITY WARNING: don't run with debug turned on in production! |
|
|
|
|
DEBUG = True |
|
|
|
|
DEBUG = False |
|
|
|
|
|
|
|
|
|
ALLOWED_HOSTS = [] |
|
|
|
|
ALLOWED_HOSTS = ['*'] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Application definition |
|
|
|
|
@ -78,8 +78,13 @@ WSGI_APPLICATION = 'enchant_server.wsgi.application' |
|
|
|
|
|
|
|
|
|
DATABASES = { |
|
|
|
|
'default': { |
|
|
|
|
'ENGINE': 'django.db.backends.sqlite3', |
|
|
|
|
'NAME': BASE_DIR / 'db.sqlite3', |
|
|
|
|
#'ENGINE': 'django.db.backends.sqlite3', |
|
|
|
|
#'NAME': BASE_DIR / 'db.sqlite3', |
|
|
|
|
'ENGINE': 'django.db.backends.postgresql', |
|
|
|
|
'NAME': 'stax_enchant_chat', |
|
|
|
|
'USER': 'stax', |
|
|
|
|
'PASSWORD': 'staxkikoo', |
|
|
|
|
'HOST': 'postgresql-stax.alwaysdata.net', |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -119,6 +124,7 @@ USE_TZ = True |
|
|
|
|
# https://docs.djangoproject.com/en/4.1/howto/static-files/ |
|
|
|
|
|
|
|
|
|
STATIC_URL = 'static/' |
|
|
|
|
STATIC_ROOT = os.path.join(BASE_DIR, 'static/') |
|
|
|
|
|
|
|
|
|
# Default primary key field type |
|
|
|
|
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field |
|
|
|
|
@ -130,6 +136,10 @@ REST_FRAMEWORK = { |
|
|
|
|
# Use Django's standard `django.contrib.auth` permissions, |
|
|
|
|
# or allow read-only access for unauthenticated users. |
|
|
|
|
'DEFAULT_PERMISSION_CLASSES': [ |
|
|
|
|
'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly' |
|
|
|
|
'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly', |
|
|
|
|
], |
|
|
|
|
'DEFAULT_AUTHENTICATION_CLASSES': [ |
|
|
|
|
'rest_framework.authentication.BasicAuthentication', |
|
|
|
|
'rest_framework.authentication.SessionAuthentication', |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
|