def post(self, request, *args, **kwargs):
if 'mod' in request.POST:
self.mod_poi(request)
- elif 'add-multimedia'in request.POST:
+ elif 'add-multimedia' in request.POST:
self.add_multimedia(request)
else:
self.add_poi(request)
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
-
+import datetime
import os
from pathlib import Path
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
-ALLOWED_HOSTS = []
+ALLOWED_HOSTS = ['*']
# Application definition
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
-AUTHENTICATION_BACKENDS = [
- "django.contrib.auth.backends.ModelBackend",
-]
+REST_FRAMEWORK = {
+ 'DEFAULT_PERMISSION_CLASSES' : (
+ 'rest_framework.permissions.IsAuthenticated',
+ ),
+ 'DEFAULT_AUTHENTICATION_CLASSES': (
+ 'rest_framework_simplejwt.authentication.JWTAuthentication',
+ 'rest_framework.authentication.SessionAuthentication',
+ 'rest_framework.authentication.BasicAuthentication',
+ ),
+}
+
+JWT_AUTH = {
+ 'JWT_ALLOW_REFRESH' : True,
+ 'JWT_EXPIRATION_DELTA': datetime.timedelta(seconds=3600),
+}
ROOT_URLCONF = 'socoin_atlas.urls'
'ENGINE': 'django.db.backends.mysql',
'NAME': 'socoin_atlas',
'USER': 'root',
- 'PASSWORD': "",
+ 'PASSWORD': "password",
'HOST': '127.0.0.1', # Or an IP Address that your DB is hosted on
'PORT': '3306',
'AUTOCOMMIT': True,
STATIC_URL = '/static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
+MEDIA_URL = '/media/'
+MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
+
# Default primary key field type
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
CLIENTI_GROUPS = 'CLIENTE'
TOUR_OPERATOR_GROUPS = 'TOUR_OPERATOR'
-ADMIN_GROUPS = 'ADMIN'
\ No newline at end of file
+ADMIN_GROUPS = 'ADMIN'
+
+'''
+PER INTEGRARE I PAGAMENTI CON PAYPAL
+https://www.youtube.com/watch?v=8rMfW4wO-vU&ab_channel=DennisIvy
+'''
\ No newline at end of file