Ticket #12568: subfieldbase-fix.diff

File subfieldbase-fix.diff, 502 bytes (added by Lars van de Kerkhof, 15 years ago)
  • django/db/models/fields/subclassing.py

     
    9191
    9292    def __get__(self, obj, type=None):
    9393        if obj is None:
    94             raise AttributeError('Can only be accessed via an instance.')
     94             return self
    9595        return obj.__dict__[self.field.name]
    9696
    9797    def __set__(self, obj, value):
Back to Top