#How does the form return an Error Message to the User?

15 messages · Page 1 of 1 (latest)

stuck sierra
#

I am trying to understand the underlying mechanism of how Django returns an Error when a form is invalid. What do I miss?

solemn veldt
#

User posts form, view validates form, form validation fail, user is returned to same page/template with error data in the form object, template renders error messages, page is returned to user?

stuck sierra
#

Why there is no page reload? When you want to update something on the user screen, normally you have some reloads.

solemn veldt
#

Øhm, in normal page flow with Django templates there will be a page reload

stuck sierra
#

My fault there is a reload. When I was doing simple example it as loading in milisecond but when I added 10K lorem impsu I saw the loading

#

LOL

#

I knew it has to reload, why would I use HTMX otherwise 😅

solemn veldt
#

You can also see it in browser Developer view

stuck sierra
#

the change in dom (flashing tags)?

solemn veldt
#

If you are unsure of a reload is happening or not, you can see the network traffic in developer tools

stuck sierra
#

ooo when use use HTMX the is info that you downlaoded HTML but when reloading there is not

#

smart