Here I will describe an example form using jQuery Form plugin. It will provide a good frontend, while Django serving a simple backend. I made this AJAX form using unobtrusive javascript. With human language it means the form will function with JavaScript disabled. And so jQuery.form plugin will work as an AJAX speedup addition and not as a major requirement. Features: * Works both with JavaScript and without. * Uses standard Django ideology/hooks. * Uses the most known jQuery plugin for forms AJAX handling. Theory: Main idea that Django supports both normal and AJAX request in a standard view. And has a handy request.is_ajax() request method. It returns True/False depending on if request search has HTTP_X_REQUESTED_WITH header for the string 'XMLHttpRequest' . jQuery.form plugin sure does have that. Backend Django. We will create an app called 'contact' for our task and place it in the example django project. Urls from the project will redirect to ...
My thoughts/recipes on Django, Python, JS and other things I try...