On Tue, Jul 26, 2011 at 08:48:24AM -0700, christian.posta wrote:
> For user input, I would like to format what they enter into 'sentence
> case'
> Example, if they input ALL CAPS for a description, I want to lowercase
> that, but according to sentence rules (first word in sentence upper
> case, rest lowercase up to the period).
> 
> I was hoping something like this exists as a convenience function/
> module, but if not i guess i'll have to write it myself.

>>> 'ALL CAPS. aNd MixED.'.title()
'All Caps. And Mixed.'

-- 
Kirill Spitsin

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to