Sfoglia il codice sorgente

No usar cookie sessions ni CSRF checks en views de la api rest

wilitp 3 anni fa
parent
commit
0c806499ef
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4 0
      app/preports/settings.py

+ 4 - 0
app/preports/settings.py

@@ -131,6 +131,10 @@ STATIC_URL = 'static/'
 
 DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
 
+DEFAULT_AUTHENTICATION_CLASSES = [
+    'rest_framework.authentication.BasicAuthentication'
+]
+
 CLIMA_URL = os.getenv("CLIMA_URL")
 
 CRONJOBS = [