Ticket #10196: 9766-fix.diff

File 9766-fix.diff, 699 bytes (added by vicvicvic, 6 years ago)

Restores width/height_field

  • django/db/models/fields/files.py

    diff --git a/django/db/models/fields/files.py b/django/db/models/fields/files.py
    index ce76a14..dd8ab2c 100644
    a b class FileDescriptor(object): 
    132132            # have the FieldFile interface added to them
    133133            file_copy = copy.copy(file)
    134134            file_copy.__class__ = type(file.__class__.__name__,
    135                                        (file.__class__, FieldFile), {})
     135                                       (file.__class__, self.field.attr_class), {})
    136136            file_copy.instance = instance
    137137            file_copy.field = self.field
    138138            file_copy.storage = self.field.storage
Back to Top