def create_language(self, name):
     try:
         language = LanguageEntity.create(name = name)
         language.put()
     except DuplicatedEntityException:
         raise LanguageException
     
     return language
 def list_languages(cls):
     """
         Return the list of languages as a list of pairs:
         ((1, "Italian"), ...)
     """
     languages = LanguageEntity.all().order('name').run()
     list = [(language.key().id(), language.name) for language in languages]
     
     return list
 def find_by_id(cls, language_id):
     return LanguageEntity.get_by_id(language_id)