Tuesday, July 26, 2011

ALL CAPS input and Sentence case

Forgive me if this might be more of a python-centric or text-handling
question more than Django, but it does come up within the context of
web development, processing user input, etc in all web frameworks
including django. I did a quick search on the forum and couldn't find
an answer. (I've also googled, but didn't turn up anything
useful....). Maybe someone can direct me to the answer...

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.

Thanks!

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate