On 11/16/06, Gary Wilson <[EMAIL PROTECTED]> wrote:
>
> Gary Wilson wrote:
> > So why the special cases? Should we keep the filters consistent with
> > their str methods?
> > title -> str.title()
>
> I did realize an example where the title filter's implementation would
> be desired. When you've got a possessive noun:
>
> >>> Template("{{ text|title }}").render(Context({"text": "the boy's blob"}))
> "The Boy's Blob"
>
> as opposed to:
> >>> "the boy's blob".title()
> "The Boy'S Blob"
>
I think you just answered your own question here. It seems more likely
that "boy's" would need proper treatment than "de'errico" because the
name is more likely to already be properly capitalized when entered.
And with the current filters, as you point out, that proper
capitalization won't be altered. Hey, if someone types in their name
wrong, we shouldn't be expected to fix it, or even know how. 'Garbage
in, garbage out' (tm).
>
> >
>
--
----
Waylan Limberg
[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---