[Django] #27505: Error messages customization and internationalization in Paginator class

16 views
Skip to first unread message

Django

unread,
Nov 18, 2016, 3:09:26 PM11/18/16
to django-...@googlegroups.com
#27505: Error messages customization and internationalization in Paginator class
------------------------------------------------+------------------------
Reporter: Anton Bazhanov | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: 1.10
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
There is no ability to change error messages raised by
Paginator.validate_number method.

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

Django

unread,
Nov 18, 2016, 3:10:03 PM11/18/16
to django-...@googlegroups.com
#27505: Error messages customization and internationalization in Paginator class
-------------------------------------+-------------------------------------
Reporter: Anton Bazhanov | Owner: Anton
Type: | Bazhanov
Cleanup/optimization | Status: assigned

Component: Core (Other) | Version: 1.10
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Anton Bazhanov):

* status: new => assigned
* owner: nobody => Anton Bazhanov


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

Django

unread,
Nov 18, 2016, 5:24:08 PM11/18/16
to django-...@googlegroups.com
#27505: Error messages customization and internationalization in Paginator class
-------------------------------------+-------------------------------------
Reporter: Anton Bazhanov | Owner: Anton
Type: | Bazhanov
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: 1.10
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Anton Bazhanov):

I created a PR https://github.com/django/django/pull/7578

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

Django

unread,
Nov 19, 2016, 5:14:45 AM11/19/16
to django-...@googlegroups.com
#27505: Error messages customization and internationalization in Paginator class
-------------------------------------+-------------------------------------
Reporter: Anton Bazhanov | Owner: Anton
Type: | Bazhanov
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

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

* has_patch: 0 => 1
* version: 1.10 => master
* stage: Unreviewed => Accepted


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

Django

unread,
Nov 19, 2016, 5:21:38 AM11/19/16
to django-...@googlegroups.com
#27505: Error messages customization and internationalization in Paginator class
-------------------------------------+-------------------------------------
Reporter: Anton Bazhanov | Owner: Anton
Type: | Bazhanov
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

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

* needs_better_patch: 0 => 1


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

Django

unread,
Dec 1, 2016, 8:40:09 AM12/1/16
to django-...@googlegroups.com
#27505: Error messages customization and internationalization in Paginator class
-------------------------------------+-------------------------------------
Reporter: Anton Bazhanov | Owner: Anton
Type: | Bazhanov
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

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

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

In [changeset:"e690eb405f09a9e58b9d95ae98991352602635d6" e690eb40]:
{{{
#!CommitTicketReference repository=""
revision="e690eb405f09a9e58b9d95ae98991352602635d6"
Refs #27505 -- Made Paginator's exception messsages translatable.
}}}

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

Django

unread,
Dec 1, 2016, 8:42:02 AM12/1/16
to django-...@googlegroups.com
#27505: Error messages customization and internationalization in Paginator class
-------------------------------------+-------------------------------------
Reporter: Anton Bazhanov | Owner: Anton
Type: | Bazhanov
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* needs_better_patch: 1 => 0
* has_patch: 1 => 0


Comment:

Strings are now marked for translation. Easing customization of error
messages to be done separately.

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

Django

unread,
Feb 6, 2021, 10:45:16 AM2/6/21
to django-...@googlegroups.com
#27505: Error messages customization and internationalization in Paginator class
--------------------------------------+------------------------------------
Reporter: Anton Bazhanov | Owner: (none)
Type: Cleanup/optimization | Status: new

Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* owner: Anton Bazhanov => (none)
* status: assigned => new


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

Django

unread,
Mar 12, 2022, 11:47:38 AM3/12/22
to django-...@googlegroups.com
#27505: Error messages customization and internationalization in Paginator class
--------------------------------------+------------------------------------
Reporter: Anton Bazhanov | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: dev

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Claude Paroz):

* easy: 0 => 1


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

Django

unread,
Mar 12, 2022, 12:34:06 PM3/12/22
to django-...@googlegroups.com
#27505: Error messages customization and internationalization in Paginator class
-------------------------------------+-------------------------------------
Reporter: Anton Bazhanov | Owner: Sagar
Type: | Gajare
Cleanup/optimization | Status: assigned

Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sagar Gajare):

* cc: Sagar Gajare (added)
* owner: (none) => Sagar Gajare


* status: new => assigned


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

Django

unread,
May 8, 2022, 1:30:39 AM5/8/22
to django-...@googlegroups.com
#27505: Error messages customization and internationalization in Paginator class
-------------------------------------+-------------------------------------
Reporter: Anton Bazhanov | Owner: Sagar
Type: | Gajare
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Shivan Sivakumaran):

Does this still need work?

--
Ticket URL: <https://code.djangoproject.com/ticket/27505#comment:10>

Django

unread,
May 9, 2022, 1:25:03 AM5/9/22
to django-...@googlegroups.com
#27505: Error messages customization and internationalization in Paginator class
-------------------------------------+-------------------------------------
Reporter: Anton Bazhanov | Owner: Sagar
Type: | Gajare
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

Replying to [comment:10 Shivan Sivakumaran]:


> Does this still need work?

Yes, see [https://code.djangoproject.com/ticket/27505#comment:6 comment]:
> ''... Easing customization of error messages to be done separately.''

--
Ticket URL: <https://code.djangoproject.com/ticket/27505#comment:11>

Django

unread,
Jun 15, 2022, 4:01:19 AM6/15/22
to django-...@googlegroups.com
#27505: Error messages customization and internationalization in Paginator class
--------------------------------------+------------------------------------
Reporter: Anton Bazhanov | Owner: (none)
Type: Cleanup/optimization | Status: new

Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* owner: Sagar Gajare => (none)


* status: assigned => new


--
Ticket URL: <https://code.djangoproject.com/ticket/27505#comment:12>

Django

unread,
Jun 23, 2022, 3:07:42 PM6/23/22
to django-...@googlegroups.com
#27505: Error messages customization and internationalization in Paginator class
-------------------------------------+-------------------------------------
Reporter: Anton Bazhanov | Owner: Pedro
Type: | Magno Müller
Cleanup/optimization | Status: assigned

Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Pedro Magno Müller):

* owner: (none) => Pedro Magno Müller


* status: new => assigned


Comment:

Hi, I'm a new contributor and I'd love to give it a try

--
Ticket URL: <https://code.djangoproject.com/ticket/27505#comment:13>

Django

unread,
Sep 20, 2022, 3:09:01 PM9/20/22
to django-...@googlegroups.com
#27505: Error messages customization and internationalization in Paginator class
-------------------------------------+-------------------------------------
Reporter: Anton Bazhanov | Owner: Pedro
Type: | Magno Müller
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Aman Pandey):

Replying to [comment:13 Pedro Magno Müller]:


> Hi, I'm a new contributor and I'd love to give it a try

hi are you still working on it or may i take the issue?

--
Ticket URL: <https://code.djangoproject.com/ticket/27505#comment:14>

Django

unread,
Sep 20, 2022, 3:09:38 PM9/20/22
to django-...@googlegroups.com
#27505: Error messages customization and internationalization in Paginator class
-------------------------------------+-------------------------------------
Reporter: Anton Bazhanov | Owner: Aman
Type: | Pandey

Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Aman Pandey):

* owner: Pedro Magno Müller => Aman Pandey


--
Ticket URL: <https://code.djangoproject.com/ticket/27505#comment:15>

Django

unread,
Sep 26, 2022, 1:54:30 AM9/26/22
to django-...@googlegroups.com
#27505: Error messages customization and internationalization in Paginator class
-------------------------------------+-------------------------------------
Reporter: Anton Bazhanov | Owner: Aman
Type: | Pandey
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Aman Pandey):

don't we have a workaround for that like directly import
"PageNotAnInteger" and "EmptyPage" Exceptions directly and user them in
our logic isn't it , a way to customization .?

--
Ticket URL: <https://code.djangoproject.com/ticket/27505#comment:16>

Django

unread,
Oct 26, 2022, 2:45:45 PM10/26/22
to django-...@googlegroups.com
#27505: Error messages customization and internationalization in Paginator class
-------------------------------------+-------------------------------------
Reporter: Anton Bazhanov | Owner: Aman
Type: | Pandey
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Uzair Ali):

Replying to [comment:14 Aman Pandey]:


> Replying to [comment:13 Pedro Magno Müller]:
> > Hi, I'm a new contributor and I'd love to give it a try
> hi are you still working on it or may i take the issue?

Hello, Can i take this up?

--
Ticket URL: <https://code.djangoproject.com/ticket/27505#comment:17>

Django

unread,
Oct 27, 2022, 1:51:20 AM10/27/22
to django-...@googlegroups.com
#27505: Error messages customization and internationalization in Paginator class
-------------------------------------+-------------------------------------
Reporter: Anton Bazhanov | Owner: Aman
Type: | Pandey
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Aman Pandey):

surReplying to [comment:17 Uzair Ali]:


> Replying to [comment:14 Aman Pandey]:
> > Replying to [comment:13 Pedro Magno Müller]:
> > > Hi, I'm a new contributor and I'd love to give it a try
> > hi are you still working on it or may i take the issue?
>
> Hello, Can i take this up?

yea sure but can we work together like ?

--
Ticket URL: <https://code.djangoproject.com/ticket/27505#comment:18>

Django

unread,
Nov 8, 2022, 3:32:26 AM11/8/22
to django-...@googlegroups.com
#27505: Error messages customization and internationalization in Paginator class
-------------------------------------+-------------------------------------
Reporter: Anton Bazhanov | Owner: Aman
Type: | Pandey
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by arischow):

I am unsure if this customisation is needed anymore as currently, all
usages of `Paginator.validate_number` will have a try/except block to
catch the `ValueError` exception and set it as `1`.

--
Ticket URL: <https://code.djangoproject.com/ticket/27505#comment:19>

Django

unread,
Apr 9, 2023, 9:36:59 PM4/9/23
to django-...@googlegroups.com
#27505: Error messages customization and internationalization in Paginator class
-------------------------------------+-------------------------------------
Reporter: Anton Bazhanov | Owner: Marcelo
Type: | Galigniana

Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

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

* owner: Aman Pandey => Marcelo Galigniana


* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/16746 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/27505#comment:20>

Django

unread,
Apr 10, 2023, 6:54:49 AM4/10/23
to django-...@googlegroups.com
#27505: Error messages customization and internationalization in Paginator class
-------------------------------------+-------------------------------------
Reporter: Anton Bazhanov | Owner: Marcelo
Type: | Galigniana
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 0 => 1

* needs_docs: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/27505#comment:21>

Django

unread,
Apr 10, 2023, 9:22:34 PM4/10/23
to django-...@googlegroups.com
#27505: Error messages customization and internationalization in Paginator class
-------------------------------------+-------------------------------------
Reporter: Anton Bazhanov | Owner: Marcelo
Type: | Galigniana
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

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

* needs_better_patch: 1 => 0

* needs_docs: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/27505#comment:22>

Django

unread,
Apr 12, 2023, 8:04:15 AM4/12/23
to django-...@googlegroups.com
#27505: Error messages customization and internationalization in Paginator class
-------------------------------------+-------------------------------------
Reporter: Anton Bazhanov | Owner: Marcelo
Type: | Galigniana
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

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

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/27505#comment:23>

Django

unread,
Apr 12, 2023, 12:38:30 PM4/12/23
to django-...@googlegroups.com
#27505: Error messages customization and internationalization in Paginator class
-------------------------------------+-------------------------------------
Reporter: Anton Bazhanov | Owner: Marcelo
Type: | Galigniana
Cleanup/optimization | Status: closed

Component: Core (Other) | Version: dev
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"dfc720c521062cdefd64bc48a11838b0fa583439" dfc720c]:
{{{
#!CommitTicketReference repository=""
revision="dfc720c521062cdefd64bc48a11838b0fa583439"
Fixed #27505 -- Allowed customizing Paginator's error messages.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27505#comment:24>

Reply all
Reply to author
Forward
0 new messages