Django CSRF ajax code from documentation repackaged as a jQuery plugin