[Django] #24341: Subclasses of django.contrib.postgres.forms.ranges.BaseRangeField should have more specific error messages

6 views
Skip to first unread message

Django

unread,
Feb 14, 2015, 8:54:19 AM2/14/15
to django-...@googlegroups.com
#24341: Subclasses of django.contrib.postgres.forms.ranges.BaseRangeField should
have more specific error messages
----------------------------------+----------------------------
Reporter: void | Owner:
Type: New feature | Status: new
Component: contrib.postgres | Version: 1.8alpha1
Severity: Normal | Keywords: i18n, postgres
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+----------------------------
I was translating new contrib.postgres strings on transifex and noticed
that all range fields use the same error message: "Enter two valid
values".
I suppose it may be misleading for the user of those fields, as the type
of those values is not explicitly specified.
I propose that each subclass of BaseRangeField - IntegerRangeField,
FloatRangeField, etc. to have its own 'invalid' error message - e.g.
"Enter two valid integers", "Enter two valid dates", etc.

--
Ticket URL: <https://code.djangoproject.com/ticket/24341>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Feb 16, 2015, 3:16:43 PM2/16/15
to django-...@googlegroups.com
#24341: Subclasses of django.contrib.postgres.forms.ranges.BaseRangeField should
have more specific error messages
----------------------------------+--------------------------------------

Reporter: void | Owner:
Type: New feature | Status: new
Component: contrib.postgres | Version: 1.8alpha1
Severity: Normal | Resolution:

Keywords: i18n, postgres | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------
Changes (by timgraham):

* cc: mjtamlyn (added)
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

Any opinion on this, Marc?

--
Ticket URL: <https://code.djangoproject.com/ticket/24341#comment:1>

Django

unread,
Feb 18, 2015, 2:58:27 AM2/18/15
to django-...@googlegroups.com
#24341: Subclasses of django.contrib.postgres.forms.ranges.BaseRangeField should
have more specific error messages
----------------------------------+--------------------------------------

Reporter: void | Owner:
Type: New feature | Status: new
Component: contrib.postgres | Version: 1.8alpha1
Severity: Normal | Resolution:

Keywords: i18n, postgres | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------

Comment (by mjtamlyn):

I don't mind, seems like it's probably a good idea. There aren't any
technical challenges. The same code of the ValidationError should be kept
across all the fields.

--
Ticket URL: <https://code.djangoproject.com/ticket/24341#comment:2>

Django

unread,
Feb 18, 2015, 9:45:26 AM2/18/15
to django-...@googlegroups.com
#24341: Subclasses of django.contrib.postgres.forms.ranges.BaseRangeField should
have more specific error messages
-------------------------------------+-------------------------------------
Reporter: void | Owner:
Type: | Status: new
Cleanup/optimization |
Component: contrib.postgres | Version: 1.8alpha1
Severity: Normal | Resolution:
Keywords: i18n, postgres | Triage Stage: Accepted
1.8-beta |

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* cc: mjtamlyn (removed)
* keywords: i18n, postgres => i18n, postgres 1.8-beta
* type: New feature => Cleanup/optimization
* easy: 0 => 1
* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/24341#comment:3>

Django

unread,
Feb 19, 2015, 3:13:39 PM2/19/15
to django-...@googlegroups.com
#24341: Subclasses of django.contrib.postgres.forms.ranges.BaseRangeField should
have more specific error messages
-------------------------------------+-------------------------------------
Reporter: void | Owner: foresmac
Type: | Status: assigned
Cleanup/optimization |
Component: contrib.postgres | Version: 1.8alpha1

Severity: Normal | Resolution:
Keywords: i18n, postgres | Triage Stage: Accepted
1.8-beta |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by foresmac):

* owner: => foresmac
* status: new => assigned


Comment:

I'll take a crack at this.

--
Ticket URL: <https://code.djangoproject.com/ticket/24341#comment:4>

Django

unread,
Feb 19, 2015, 4:09:34 PM2/19/15
to django-...@googlegroups.com
#24341: Subclasses of django.contrib.postgres.forms.ranges.BaseRangeField should
have more specific error messages
-------------------------------------+-------------------------------------
Reporter: void | Owner: foresmac
Type: | Status: assigned
Cleanup/optimization |
Component: contrib.postgres | Version: 1.8alpha1

Severity: Normal | Resolution:
Keywords: i18n, postgres | Triage Stage: Accepted
1.8-beta |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by foresmac):

Tim,

Should these just be "integers", "floats", or something more humane? E.g.
"Enter two valid whole numbers"?

--
Ticket URL: <https://code.djangoproject.com/ticket/24341#comment:5>

Django

unread,
Feb 19, 2015, 4:40:27 PM2/19/15
to django-...@googlegroups.com
#24341: Subclasses of django.contrib.postgres.forms.ranges.BaseRangeField should
have more specific error messages
-------------------------------------+-------------------------------------
Reporter: void | Owner: foresmac
Type: | Status: assigned
Cleanup/optimization |
Component: contrib.postgres | Version: 1.8alpha1
Severity: Normal | Resolution:
Keywords: i18n, postgres | Triage Stage: Accepted
1.8-beta |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by foresmac):

* has_patch: 0 => 1


Comment:

Pull request open here: https://github.com/django/django/pull/4169

--
Ticket URL: <https://code.djangoproject.com/ticket/24341#comment:6>

Django

unread,
Feb 20, 2015, 4:13:34 PM2/20/15
to django-...@googlegroups.com
#24341: Subclasses of django.contrib.postgres.forms.ranges.BaseRangeField should
have more specific error messages
-------------------------------------+-------------------------------------
Reporter: void | Owner: foresmac
Type: | Status: assigned
Cleanup/optimization |
Component: contrib.postgres | Version: 1.8alpha1
Severity: Normal | Resolution:
Keywords: i18n, postgres | Triage Stage: Ready for
1.8-beta | checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/24341#comment:7>

Django

unread,
Feb 20, 2015, 4:50:05 PM2/20/15
to django-...@googlegroups.com
#24341: Subclasses of django.contrib.postgres.forms.ranges.BaseRangeField should
have more specific error messages
-------------------------------------+-------------------------------------
Reporter: void | Owner: foresmac
Type: | Status: closed
Cleanup/optimization |
Component: contrib.postgres | Version: 1.8alpha1
Severity: Normal | Resolution: fixed

Keywords: i18n, postgres | Triage Stage: Ready for
1.8-beta | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"1d1d5d1c315e0e58f02a7f2a07b56ed20b09c087"]:
{{{
#!CommitTicketReference repository=""
revision="1d1d5d1c315e0e58f02a7f2a07b56ed20b09c087"
Fixed #24341 -- Added specific error messages to RangeField subclasses
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24341#comment:8>

Django

unread,
Feb 20, 2015, 4:51:59 PM2/20/15
to django-...@googlegroups.com
#24341: Subclasses of django.contrib.postgres.forms.ranges.BaseRangeField should
have more specific error messages
-------------------------------------+-------------------------------------
Reporter: void | Owner: foresmac
Type: | Status: closed
Cleanup/optimization |
Component: contrib.postgres | Version: 1.8alpha1

Severity: Normal | Resolution: fixed
Keywords: i18n, postgres | Triage Stage: Ready for
1.8-beta | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"3207fcd0a0b90e677b1bb5cf662dee21c659adab"]:
{{{
#!CommitTicketReference repository=""
revision="3207fcd0a0b90e677b1bb5cf662dee21c659adab"
[1.8.x] Fixed #24341 -- Added specific error messages to RangeField
subclasses

Backport of 1d1d5d1c315e0e58f02a7f2a07b56ed20b09c087 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24341#comment:9>

Reply all
Reply to author
Forward
0 new messages