django-ajax-forms icondjango-ajax-forms 0.3.1

Client side JavaScript validation for any Django form
django-ajax-forms is a client side JavaScript validation for any Django form.

Simple Examples

A complete example is included in the source repository and includes several samples of the library in use.

A basic example of usage:

{% load ajax_form_utils %}

< form method="post" >
 < table >
 {{ form.as_table }}
 < tr >< td >< /td >< td >< input type="submit" / >< /td >< /tr >
 < /table >
< /form >

< script type="text/javascript" >
 $(function(){
 $('form').validation({% render_ajax_fields form %});
 });
< /script >


With DL rendering:

{% load ajax_form_utils %}

< form method="post" >
 < dl >
 {{ as_dl form }}
 < dd >< /dd >
 < /dl >
< /form >


< script type="text/javascript" >
 $(function(){
 $('form').validation({% render_ajax_fields form %}, {
 layout: 'dl'
 });
 });
< /script >

Main features:

  • Template tag to provide JavaScipt (JSON) field description of any Django form via introspection.
  • Extended attributes defined on the form (similar to inner Meta classs)
  • Custom validation, similar to how clean is used in Form classes
  • Comparison between fields (ie compare password and password check fields)
  • Support for custom fields (ie fields that are not part of the Django distribution)
  • Output form using a structure
  • Caching of generated JSON. Uses the built in caching framework to cache generated JSON.

last updated on:
February 21st, 2012, 15:30 GMT
price:
FREE!
developed by:
Tim Savage
license type:
BSD License 
category:
ROOT \ Internet \ HTTP (WWW)

FREE!

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Add your review!

SUBMIT