Home > database >  Does i need to use django.forms when i using ajax
Does i need to use django.forms when i using ajax

Time:12-07

I gonna made a few forms on one page and post it with ajax. So i got question - do i need use django forms for it, or just views?

In my opinion django forms can validate html form by themself, but i actually don't know it. So what is the better decision in that case

CodePudding user response:

No, you don't have to use Django forms when using Ajax. You can use the views to handle the requests and validate the data, without using forms. However, using Django forms can help you to quickly validate the data and also keep your code organized and easier to maintain. In the end, it depends on your choice and the needs of your application.

  • Related