Ticket #4415: positiveintegerfield.diff
File positiveintegerfield.diff, 660 bytes (added by , 17 years ago) |
---|
-
django/db/models/fields/__init__.py
838 838 def get_manipulator_field_objs(self): 839 839 return [oldforms.PositiveIntegerField] 840 840 841 def formfield(self, **kwargs): 842 defaults = {'min_value': 0} 843 defaults.update(kwargs) 844 return super(PositiveIntegerField, self).formfield(**defaults) 845 841 846 class PositiveSmallIntegerField(IntegerField): 842 847 def get_manipulator_field_objs(self): 843 848 return [oldforms.PositiveSmallIntegerField]