django - python underscore function name -


i reading django article on form validatin here , came across this

validationerror(_('invalid value'), code='invalid') 

my question _('invalid value') does?

it's translation purpose

you should see @ begining of script

from django.utils.translation import ugettext _ 

you can see complete explanation in doc


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -