Opened 14 years ago

Closed 13 years ago

#15939 closed New feature (wontfix)

SignedIntegerField / UnsignedIntegerField as part of the core fields.py

Reported by: Cal Leeming Owned by: nobody
Component: Database layer (models, ORM) Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I'd like to place a feature request to see SignedIntegerField and UnsignedIntegerField included as part of the core fields.py ( which will adhere to the 32bit limits.h defaults - http://en.wikipedia.org/wiki/Limits.h )

There has been some discussion so far in the following threads:

http://code.djangoproject.com/ticket/15923

http://groups.google.com/group/django-developers/browse_thread/thread/f0b8ddbda03a2d8e

http://groups.google.com/group/django-developers/browse_thread/thread/22dd636f421823fd/a058fd6c31ee09e3

In terms of a use case scenario, I would imagine that most developers are used to working within the restrictions of a 32bit integer, and it would be nice to have this same ability for Django - out of the box.

If this is accepted, I'd be more than willing to submit the code and documentation patch.

Change History (2)

comment:1 by Aymeric Augustin, 14 years ago

Triage Stage: UnreviewedDesign decision needed

I am not sure the 32 bit limit is really relevant: it does not exist in Python and 64 bit machines are the common case today.

SignedIntegerField and UnsignedIntegerField could cause confusion with PositiveIntegerField and IntegerField. Maybe adding optional min_value and max_value parameters to the existing fields would be more appropriate.

#56 tackles a similar problem, the solutions proposed over there could be interesting here.

comment:2 by Aymeric Augustin, 13 years ago

Resolution: wontfix
Status: newclosed
UI/UX: unset

Upon further thought, 32bit limits.h isn't very relevant for the modern web, and we already have too many field types.

Note: See TracTickets for help on using tickets.
Back to Top