Ticket #16645: 16645.patch
File 16645.patch, 1.4 KB (added by , 13 years ago) |
---|
-
tests/modeltests/model_forms/tests.py
1317 1317 f = OptionalImageFileForm(data={'description': u'Test'}) 1318 1318 self.assertEqual(f.is_valid(), True) 1319 1319 instance = f.save() 1320 self.assertEqual(instance.image.name, None)1320 self.assertEqual(instance.image.name, '') 1321 1321 self.assertEqual(instance.width, None) 1322 1322 self.assertEqual(instance.height, None) 1323 1323 -
tests/modeltests/model_forms/models.py
132 132 description = models.CharField(max_length=20) 133 133 image = models.ImageField(storage=temp_storage, upload_to=custom_upload_path, 134 134 width_field='width', height_field='height', 135 blank=True , null=True)135 blank=True) 136 136 width = models.IntegerField(editable=False, null=True) 137 137 height = models.IntegerField(editable=False, null=True) 138 138 path = models.CharField(max_length=16, blank=True, default='')