On 7/11/07, Peter Nixon <[EMAIL PROTECTED]> wrote:
> I have added a patch to Ticket #399 at:
> http://code.djangoproject.com/attachment/ticket/399/django-bigint-20070711.patch

A few days ago, I added a hook to the database Field class -- a
db_type() method -- along with some documentation on how to create a
custom database field type:

http://www.djangoproject.com/documentation/model-api/#custom-field-types

I'm not necessarily saying we shouldn't add a BigIntegerField as one
of Django's built-in types; I'm saying this new hook could help you
out in the interim. It's as easy as doing this:

class BigIntegerField(models.IntegerField):
    def db_type(self):
        return 'bigint'

...then use BigIntegerField() in your model.

Note that there *might* be some validation issues to sort out -- i.e.,
Django will use the default IntegerField validation in the admin, and
that validation might be too strict -- but I forget whether the
IntegerField validation checks that the value is in a given range.

Adrian

-- 
Adrian Holovaty
holovaty.com | djangoproject.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to