def _validate_locale(locale):
 if (locale and (locale not in settings.SUMO_LANGUAGES)):
  raise Http404
 return locale

def _validate_locale ( locale ) : if ( locale and ( locale not in settings . SUMO_LANGUAGES ) ) : raise Http404 return locale
make sure the locale is enabled on sumo .