Front/html

.html Response(django to js(html)) db send

jm_p_op 2023. 5. 24. 21:04

views.py

data="데이터 백에서 프론트로 주기"
Response({"message":data}, status=status.HTTP_200_OK)

 

get.js

    const data = await response.json()
    console.log(data)

    console.log(response["message"])