[Django] #25552: Admin readonly field help text show 'None'

8 views
Skip to first unread message

Django

unread,
Oct 13, 2015, 12:14:44 PM10/13/15
to django-...@googlegroups.com
#25552: Admin readonly field help text show 'None'
-------------------------------+-----------------------
Reporter: iici-gli | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.8
Severity: Normal | Keywords: help text
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------+-----------------------
The help_text_for_field function in contrib/admin/utils returns 'None' if
field.help_text is None.
Needs to following statements:
if hasattr(field, 'help_text'):
help_text = field.help_text

TO:
help_text = getattr(field, 'help_text', '')

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

Django

unread,
Oct 13, 2015, 1:22:12 PM10/13/15
to django-...@googlegroups.com
#25552: Admin readonly field help text show 'None'
-------------------------------+--------------------------------------

Reporter: iici-gli | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.8
Severity: Normal | Resolution:

Keywords: help text | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Old description:

> The help_text_for_field function in contrib/admin/utils returns 'None'
> if field.help_text is None.
> Needs to following statements:
> if hasattr(field, 'help_text'):
> help_text = field.help_text
>
> TO:
> help_text = getattr(field, 'help_text', '')

New description:

The help_text_for_field function in contrib/admin/utils returns 'None' if
field.help_text is None.
Needs to following statements:
{{{
if hasattr(field, 'help_text'):
help_text = field.help_text
}}}
TO:
{{{
help_text = getattr(field, 'help_text', '')
}}}

--

Comment:

Is there a reason for using `help_text=None` as opposed to an empty
string?

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

Django

unread,
Oct 16, 2015, 1:41:00 AM10/16/15
to django-...@googlegroups.com
#25552: Admin readonly field help text show 'None'
-------------------------------+----------------------------------------
Reporter: iici-gli | Owner: romanfuentes
Type: Bug | Status: assigned
Component: contrib.admin | Version: 1.8
Severity: Normal | Resolution:

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

* owner: nobody => romanfuentes
* status: new => assigned


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

Django

unread,
Oct 16, 2015, 11:53:26 AM10/16/15
to django-...@googlegroups.com
#25552: Admin readonly field help text show 'None'
-------------------------------+----------------------------------------
Reporter: iici-gli | Owner: romanfuentes
Type: Bug | Status: closed
Component: contrib.admin | Version: 1.8
Severity: Normal | Resolution: wontfix

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

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


Comment:

Closing as "won't fix" pending a justification of why support for
`help_text=None` is needed.

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

Reply all
Reply to author
Forward
0 new messages