Changeset 4294
- Timestamp:
- 01/08/07 12:06:22 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/tests/modeltests/model_forms/models.py
r4263 r4294 68 68 69 69 >>> f = CategoryForm({'name': 'Entertainment', 'url': 'entertainment'}) 70 >>> f. errors71 {} 70 >>> f.is_valid() 71 True 72 72 >>> f.clean_data 73 73 {'url': u'entertainment', 'name': u'Entertainment'} … … 79 79 80 80 >>> f = CategoryForm({'name': "It's a test", 'url': 'test'}) 81 >>> f. errors82 {} 81 >>> f.is_valid() 82 True 83 83 >>> f.clean_data 84 84 {'url': u'test', 'name': u"It's a test"} … … 92 92 yet been saved. In this case, it's up to you to save it. 93 93 >>> f = CategoryForm({'name': 'Third test', 'url': 'third'}) 94 >>> f. errors95 {} 94 >>> f.is_valid() 95 True 96 96 >>> f.clean_data 97 97 {'url': u'third', 'name': u'Third test'} … … 110 110 {'name': [u'This field is required.']} 111 111 >>> f.clean_data 112 Traceback (most recent call last): 113 ... 114 AttributeError: 'CategoryForm' object has no attribute 'clean_data' 112 115 >>> f.create() 113 116 Traceback (most recent call last):
