#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 <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.b2aa559644062fbd654b662492af9834%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.