Changeset 6944
- Timestamp:
- 12/18/07 21:39:21 (9 months ago)
- Files:
-
- django/trunk/docs/form_for_model.txt (modified) (1 diff)
- django/trunk/docs/modelforms.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/docs/form_for_model.txt
r6844 r6944 1 1 Generating forms for models 2 2 =========================== 3 4 .. admonition:: Note 5 6 The APIs described in this document have been deprecated. If you're 7 developing new code, use `ModelForms`_ instead. 8 9 .. _ModelForms: ../modelforms/ 3 10 4 11 If you're building a database-driven app, chances are you'll have forms that django/trunk/docs/modelforms.txt
r6915 r6944 278 278 To avoid this failure, you must instantiate your model with initial values 279 279 for the missing, but required fields, or use ``save(commit=False)`` and 280 manually set any extra required fields::280 manually set any extra required fields:: 281 281 282 282 instance = Instance(required_field='value') … … 297 297 298 298 The default field types, as described in the "Field types" table above, are 299 sensible defaults ; if you have a ``DateField`` in your model, chances are you'd299 sensible defaults. If you have a ``DateField`` in your model, chances are you'd 300 300 want that to be represented as a ``DateField`` in your form. But 301 301 ``ModelForm`` gives you the flexibility of changing the form field type
