On Thursday, January 17, 2013, Simon Litchfield wrote: > Also, did you see psycopg2.extras.DateTimeRange? > > No, I missed that one !
Thanks I 'll see if it can be used somehow, but since the range types have to be used by the core django code, I doubt they can be imported from a third party library > On Monday, December 31, 2012 8:56:12 PM UTC+11, mpaolini wrote: >> >> Hi all, >> >> sorry for the noise, forget my previous mail as it was pointing to the >> wrong commit, >> here's the good one: >> >> https://github.com/mpaolini/**django/commit/** >> b754abdeab204949510500ccb1b845**b7ad143542<https://github.com/mpaolini/django/commit/b754abdeab204949510500ccb1b845b7ad143542> >> >> copying here the rest of the original mail: >> >> postgresql since version 9.2 added support for range types [1] >> they have a nice set of specialized operators like "overlaps", "left of", >> etc... [2] >> >> So I decided to work on a reference implementation for Django >> even if it looks like psycopg2 does not fully support yet these data >> types [3] >> >> The implementation is only a proof of concept and is not complete and not >> tested >> (but it does contain tests, of course!) >> >> I did: >> - datetime range python data type: two bounds plus inclusive/excusive >> info (very basic!) >> - datetime range model field >> - range specific lookups for querysets >> - non-overlapping constraint: db-level enforced with sql CONSTRAINT and >> model validation >> - some documentation >> >> TODO: >> - form, widget, modelform, localization, admin >> - more range types (int, bigint, etc...) >> - more validation against invalid ranges >> - better range type python implementation >> - more testing >> >> Do you like it? Any chances for it to land in master once it is >> completed? Or is it too specialized? >> >> Cheers, >> >> Marco >> >> [1] >> http://www.postgresql.org/**docs/9.2/static/rangetypes.**html<http://www.postgresql.org/docs/9.2/static/rangetypes.html> >> [2] http://www.postgresql.org/**docs/9.2/static/functions-** >> range.html#RANGE-OPERATORS-**TABLE<http://www.postgresql.org/docs/9.2/static/functions-range.html#RANGE-OPERATORS-TABLE> >> [3] >> http://archives.postgresql.**org/psycopg/2012-09/msg00051.**php<http://archives.postgresql.org/psycopg/2012-09/msg00051.php> >> >> -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/django-developers/-/shC1MhFZg4YJ. > To post to this group, send email to > django-developers@googlegroups.com<javascript:_e({}, 'cvml', > 'django-developers@googlegroups.com');> > . > To unsubscribe from this group, send email to > django-developers+unsubscr...@googlegroups.com <javascript:_e({}, 'cvml', > 'django-developers%2bunsubscr...@googlegroups.com');>. > For more options, visit this group at > http://groups.google.com/group/django-developers?hl=en. > -- 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 django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.