| 510 | DateTimeField rendered as_hidden() is special too |
| 511 | |
| 512 | >>> class MessageForm(Form): |
| 513 | ... when = SplitDateTimeField() |
| 514 | >>> f = MessageForm({'when_0': '1992-01-01', 'when_1': '01:01'}) |
| 515 | >>> print f.is_valid() |
| 516 | True |
| 517 | >>> print f['when'] |
| 518 | <input type="text" name="when_0" value="1992-01-01" id="id_when_0" /><input type="text" name="when_1" value="01:01" id="id_when_1" /> |
| 519 | >>> print f['when'].as_hidden() |
| 520 | <input type="hidden" name="when_0" value="1992-01-01" id="id_when_0" /><input type="hidden" name="when_1" value="01:01" id="id_when_1" /> |
| 521 | |