Ticket #7609: UnsignedIntegerField.diff

File UnsignedIntegerField.diff, 623 bytes (added by jcrocholl, 16 years ago)

Very simple patch to add UnsignedIntegerField and UnsignedSmallIntegerField as subclasses of PositiveIntegerField and PositiveSmallIntegerField.

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

     
    759759        defaults.update(kwargs)
    760760        return super(PositiveSmallIntegerField, self).formfield(**defaults)
    761761
     762class UnsignedIntegerField(PositiveIntegerField):
     763    pass
     764
     765class UnsignedSmallIntegerField(PositiveSmallIntegerField):
     766    pass
     767
    762768class SlugField(CharField):
    763769    def __init__(self, *args, **kwargs):
    764770        kwargs['max_length'] = kwargs.get('max_length', 50)
Back to Top