--
Ticket URL: <https://code.djangoproject.com/ticket/28984>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* Attachment "various_shortcuts.patch" added.
* component: Uncategorized => Core (Other)
* stage: Unreviewed => Ready for checkin
Comment:
[https://github.com/django/django/pull/9532 PR]
The change in django/contrib/admin/models.py isn't included because
besides capitalizing the first character of the string, `capitalize()`
also lower cases the rest of the characters which isn't desired.
--
Ticket URL: <https://code.djangoproject.com/ticket/28984#comment:1>
--
Ticket URL: <https://code.djangoproject.com/ticket/28984#comment:2>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"acc8dd4142ec81def9a73507120c0262ba6b1264" acc8dd4]:
{{{
#!CommitTicketReference repository=""
revision="acc8dd4142ec81def9a73507120c0262ba6b1264"
Fixed #28984 -- Made assorted code simplifications.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28984#comment:3>
Comment (by Jon Dufresne):
> The change in django/contrib/admin/models.py isn't included because
besides capitalizing the first character of the string, capitalize() also
lower cases the rest of the characters which isn't desired.
`capfirst()` may be a suitable alternative:
https://github.com/django/django/blob/2.0.1/django/utils/text.py#L15-L17
Found the pattern repeated in the folowing:
{{{
./django/utils/lorem_ipsum.py:68: return '%s%s%s' % (s[0].upper(),
s[1:], random.choice('?.'))
./django/template/defaultfilters.py:75: return value and
value[0].upper() + value[1:]
./django/contrib/admin/models.py:125: change_message = '
'.join(msg[0].upper() + msg[1:] for msg in messages)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28984#comment:4>