Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8800465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:35:43+00:00 2026-06-14T00:35:43+00:00

On the Google App Engine, I have a webapp2 model like this: def Person(db.model):

  • 0

On the Google App Engine, I have a webapp2 model like this:

def Person(db.model):
    first_name = db.StringProperty()
    surname = db.StringProperty()
    languages_spoken = db. ListProperty()

However, I’d like to have the languages_spoken list constrained to a list of options, say English, French, and Spanish, that can change as time goes on. With SQL this would be easy with person, language, and person_language tables (or similar) but I can’t get my head round how to do it in this case, or even if it’s possible. Any suggestions anyone?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T00:35:44+00:00Added an answer on June 14, 2026 at 12:35 am

    In the end I went with this, thanks to the pointers from the two other answers:

    from google.appengine.ext import ndb
    
    languages = ['English', 'French', 'Spanish']
    
    def Person(ndb.model):
        first_name = ndb.StringProperty()
        surname = ndb.StringProperty()
        languages_spoken = ndb.StringProperty(repeated=True, choices=languages)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

we have app hosted on google app engine for java. In this app we
I have two data sets in google app engine datastore. class First_Set(db.Model): start_time =
I have created a datastore on the google app engine but would like to
I am writing a google app engine app and I have this key value
I have created a backend for my google app that looks like this: backends:
I have a model like this: class Group(db.Model): name = db.StringProperty() description = db.TextProperty()
I have a single code file for my Google App Engine project. This simple
I am a beginner in Google app engine and i have this question. I
So I have a python webapp on Google App Engine and am using the
In google app engine can I have www.domain.com point to version X of my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.