def txn(): code = gen_salt(20) language = i18n.get_locale() profile = Profile(user=user, verification_code=code, language=language) profile.put() return profile
def get_locale(): return i18n.get_locale()