I was reading the django article on form validatin here and i came across this
ValidationError(_('Invalid value'), code='invalid')
my question is what does the _('Invalid value')
does?
I was reading the django article on form validatin here and i came across this
ValidationError(_('Invalid value'), code='invalid')
my question is what does the _('Invalid value')
does?
it's for translation purpose
you should see this at the begining of the script
from django.utils.translation import ugettext as _
_
is often associated with internationalization
might be duplication of Mercurial/Python - What Does The Underscore Function Do?