From: Costantino Vitale Date: Thu, 29 Sep 2022 14:24:24 +0000 (+0200) Subject: Modifica setting e requirements X-Git-Url: https://git.atlas4tour.it/?a=commitdiff_plain;h=0d56a6440149c3ae67a4679ea4b42eec6789ff06;p=pia_atlas.git Modifica setting e requirements --- diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..3797751 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,11 @@ +asgiref==3.5.2 +Django==3.2.15 +django-braces==1.15.0 +django-crispy-forms==1.14.0 +djangorestframework==3.14.0 +djangorestframework-simplejwt==5.2.0 +mysqlclient==2.1.1 +PyJWT==2.5.0 +pytz==2022.2.1 +sqlparse==0.4.3 +typing_extensions==4.3.0 diff --git a/socoin_atlas/settings.py b/socoin_atlas/settings.py index d92ae8f..3e95406 100644 --- a/socoin_atlas/settings.py +++ b/socoin_atlas/settings.py @@ -10,6 +10,7 @@ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ +import os from pathlib import Path # Build paths inside the project like this: BASE_DIR / 'subdir'. @@ -37,7 +38,10 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', - 'frontend', + 'crispy_forms', + 'sistema', + 'utenti', + 'api', ] @@ -51,12 +55,17 @@ MIDDLEWARE = [ 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] +AUTHENTICATION_BACKENDS = [ + "django.contrib.auth.backends.ModelBackend", +] + + ROOT_URLCONF = 'socoin_atlas.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [BASE_DIR / 'templates'] + 'DIRS': [os.path.join(BASE_DIR, '/templates')] , 'APP_DIRS': True, 'OPTIONS': { @@ -114,9 +123,9 @@ AUTH_PASSWORD_VALIDATORS = [ # Internationalization # https://docs.djangoproject.com/en/3.2/topics/i18n/ -LANGUAGE_CODE = 'en-us' +ANGUAGE_CODE = 'en-us' -TIME_ZONE = 'UTC' +TIME_ZONE = 'Europe/Rome' USE_I18N = True @@ -129,8 +138,14 @@ USE_TZ = True # https://docs.djangoproject.com/en/3.2/howto/static-files/ STATIC_URL = '/static/' +STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')] # Default primary key field type # https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' + + +CLIENTI_GROUPS = 'CLIENTI' +TOUR_OPERATOR_GROUPS = 'TOUR_OPERATOR' +ADMIN_GROUPS = 'ADMIN' \ No newline at end of file