Explorar el Código

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

wilitp hace 3 años
padre
commit
0c806499ef
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  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 = [