djangosnippets.org: Latest snippets posted by danjakhttps://djangosnippets.org/users/danjak/2007-03-11T14:59:11.338971-05:00danjaksend_file and send_data
2007-03-11T14:59:11.338971-05:00danjakhttps://djangosnippets.org/snippets/101/<p>Simple functions for downloading files - send_data sends the data directly, send_file as attachment. May need optimizing for large files.
</p>
Freely redistributablecreate_object and update_object for newforms
2007-03-11T14:25:17.136558-05:00danjakhttps://djangosnippets.org/snippets/99/<p>create_object and update_project modified to handle newforms (including FileFields). In addition, I have added some extras:</p>
<ol>
<li>
<p>extra_fields - this is a dict or callable that contains additional fields to be passed to the form, for example stuff that is in the session.</p>
</li>
<li>
<p>on_success - callback called if form is valid …</p></li></ol>
Freely redistributableSelectively change fields, widgets or labels in forms created from models
2007-02-28T21:27:34.132798-06:00danjakhttps://djangosnippets.org/snippets/59/<p>Allows you to override form fields created by form_for_model or form_for_instance, without having to redefine whole fields for example in form.base_fields.</p>
Freely redistributable