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

  • SEARCH
  • Home
  • 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 568513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:11:47+00:00 2026-05-13T13:11:47+00:00

I am currently using Django forms with the Google App Engine and I have

  • 0

I am currently using Django forms with the Google App Engine and I have a model which is as follows:

class Menu(db.Model):
    name = db.StringProperty(required=True)
    is_special = db.BooleanProperty()
    menu_items =  db.ListProperty(MenuItem)

I have a MenuForm which is the following:

class MenuForm(djangoforms.ModelForm):
    class Meta:
        model = Menu
        exclude = ['added_by','menu_items']

When I run this I get the following error:

Exception Type:     ValueError
Exception Value:    Item type MenuItem is not acceptable

I want to crate the form and have it omit the menu_items property as for one I don’t think there is an in built control for the multiple choice, like a group of check boxes. Either way I cannot understand with this property in the exclude items why it is throwing this error.

TIA

Andrew

  • 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-05-13T13:11:48+00:00Added an answer on May 13, 2026 at 1:11 pm

    Your problem comes well before the “create a form” task begins: ListProperty does not allow a list of model entities (although I can’t find this clearly documented in the app engine docs, I’m still looking in the docs for a good, clear, unambiguous statement about that). Try changing it into (say) a list of strings, and you’ll see everything works (I believe a dropdown is what you get if you don’t exclude such a property).

    Edit: found the spot in the docs where the issue is mentioned, although it’s quaintly phrased — quoting with added emphasis:

    The list can contain values of any of
    the value types supported by the
    datastore.

    …point is, you can have in the list objects of any of the value types… not reference ones, i.e., entities that are instances of some model.

    Could you use a list of key strings, instead…?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Am using django forms on my app. I have a model Client like this:
Using Django 1.1.1 In models.py: class Site(models.Model): name = models.CharField(max_length=50) class SiteMonth(models.Model): site =
I have an AppEngine app that I'm migrating to run in Django, using app-engine-patch
I currently have a simple model defined, with a photoupload feature using django thumbnails
I using Django and a generic view django.views.generic.create_update.create_object I have a model form wich
I am using django-userena . I have a model called UserProfile . I've added
In a django application I have the following model: class Appointment(models.Model): #some other fields
I am currently using the forms in django.contrib.auth to change a user password, but
I am currently working an a webapp, using mongoengine and django, which will require
I'm currently making a django website, and I'm confused between using Django-Forms and the

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.