Django - AJAX Requests, HTMX & CSRF Tokens

preview_player
Показать описание
☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:

In this video, we'll learn about sending the CSRF Token alongside AJAX POST requests in Django applications, as well as with HTMX.

📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
01:52 Sending AJAX POST request when button is clicked
03:38 Adding data attribute to HTML button element
05:37 Sending fetch() request
07:54 Sending CSRF Token in AJAX request
11:03 Updating Django view for AJAX request
12:26 HTMX and CSRF Tokens

𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:

📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:

#python #django #webdevelopment #htmx
Рекомендации по теме
Комментарии
Автор

Htmx is huge game changer, but you also are a great MASTER. Thank you to give us reason to progress over years 🙇

seydinaoumarsamabaly
Автор

Loving your content. I watch every single one! It's weird, the topic you cover is often what I'm dealing with at my org.

ClintRobison
Автор

Loving the refrerence about american goverment 😂😂😂💪🏽💪🏽👏🏼👏🏼👏🏼

Sejl
Автор

Can you make a tutorial about FastHTML? I'm wondering if this could be a good replacement for React and for doing web dev with using Python only. What do you think?

omegasigma
Автор

Thanks for the breakdown! A bit off-topic, but I wanted to ask: My OKX wallet holds some USDT, and I have the seed phrase. (alarm fetch churn bridge exercise tape speak race clerk couch crater letter). How should I go about transferring them to Binance?

CeylanTuğlu
Автор

in use of htmx + Django Partial html. It seem to be make django views + template + url a little messy. Do you have any Idea to manage this situation?

jpongthep