[Django] #27898: Inheriting from AbstractBaseUser does not interpolate unique error message on field

6 views
Skip to first unread message

Django

unread,
Mar 3, 2017, 6:07:06 AM3/3/17
to django-...@googlegroups.com
#27898: Inheriting from AbstractBaseUser does not interpolate unique error message
on field
-----------------------------------------+------------------------
Reporter: unho | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | 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 |
-----------------------------------------+------------------------
If a custom `User` model inherits from `AbstractBaseUser` instead of
`AbstractUser` and it defines a unique field the uniqueness error message
used is not correctly interpolated and is rendered as is: %(model_name)s
with this %(field_label)s already exists.

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

Django

unread,
Mar 3, 2017, 8:32:12 AM3/3/17
to django-...@googlegroups.com
#27898: Inheriting from AbstractBaseUser does not interpolate unique error message
on field
-------------------------------+--------------------------------------

Reporter: unho | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | 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 Tim Graham):

Could you please gave an example model and code to reproduce the problem?

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

Django

unread,
Mar 4, 2017, 10:50:54 PM3/4/17
to django-...@googlegroups.com
#27898: Inheriting from AbstractBaseUser does not interpolate unique error message
on field
------------------------------+--------------------------------------
Reporter: unho | Owner: nobody
Type: Bug | Status: closed
Component: contrib.auth | Version: 1.10
Severity: Normal | Resolution: needsinfo

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 Tim Graham):

* component: Uncategorized => contrib.auth
* type: Uncategorized => Bug
* status: new => closed
* resolution: => needsinfo


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

Reply all
Reply to author
Forward
0 new messages