install to dependency

This commit is contained in:
starnakin 2023-11-08 14:51:48 +01:00
parent 9d8476ebb8
commit eb8789aa1d
2 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,8 @@
asgiref==3.7.2 asgiref==3.7.2
Django==4.2.6 Django==4.2.6
django-cors-headers==4.3.0
django-restapi==0.1.3
djangorestframework==3.14.0
install==1.3.5
pytz==2023.3.post1
sqlparse==0.4.4 sqlparse==0.4.4

View File

@ -29,6 +29,11 @@ CSRF_TRUSTED_ORIGINS = ['https://code.chauvet.pro', 'https://django.chauvet.pro'
ALLOWED_HOSTS = ["*"] ALLOWED_HOSTS = ["*"]
CORS_ORIGIN_ALLOW_ALL = False
CORS_ORIGIN_WHITELIST = (
'http://localhost:8000',
)
# Application definition # Application definition
@ -36,6 +41,8 @@ INSTALLED_APPS = [
'accounts.apps.AccountsConfig', 'accounts.apps.AccountsConfig',
'profiles.apps.ProfilesConfig', 'profiles.apps.ProfilesConfig',
'corsheaders',
'rest_framework',
'django.contrib.admin', 'django.contrib.admin',
'django.contrib.auth', 'django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.contenttypes',
@ -45,6 +52,8 @@ INSTALLED_APPS = [
] ]
MIDDLEWARE = [ MIDDLEWARE = [
'corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.security.SecurityMiddleware', 'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware', 'django.middleware.common.CommonMiddleware',