Hi,

I have seen the same error before.  So I tried to reproduce it, but
unforunately, I could not see that error with your code.  What does
your
views.py look like?

I saw this error while I was trying to use modelformsets with the
instruction of:

  http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#id1

I could overcome this error by adding:

  self.fields = []

to the __init__ method of ModelOptions class in models.py of
appengine-helper, but another similar error came up.

I tackled this one only to see another error.
(Please read above line several times.)

I finally got to know that I am not bright enough to solve this...

Probably, it is one of the limitations of the helper.

On May 12, 5:01 pm, simon101 <simon...@gmail.com> wrote:
> Hi guys
>
> I have this strange error coming up on a model form.  I have packaged
> Django 1.0.2 myself in my application directory with appengine
> helper.  My code with a subset of fields looks like this:
>
> from appengine_django.models import BaseModel
> from google.appengine.ext import db
> from django import forms
> from django.forms import ModelForm
> from django.forms import fields
>
> class Contract(BaseModel):
>         TITLE_CHOICES = (
>                 ('M', 'Mr'),
>                 ('R', 'Mrs'),
>                 ('I', 'Miss'),
>                 ('S', 'Ms'),
>         )
>         forenames = db.StringProperty(verbose_name="forenames")
>         surname = db.StringProperty(verbose_name="surname")
>         title = db.StringProperty(verbose_name="title",choices=TITLE_CHOICES)
>
> class ContractForm(ModelForm):
>         forenames = fields.CharField(max_length=50)
>         surname = fields.CharField(max_length=50)
>         title = fields.CharField(max_length=1)
>
>         class Meta:
>                 model = Contract
>
> After a lot of trial and error involving a lot of cutting and pasting
> I narrowed it down to the class Meta declaration.  The problem seems
> to arise when a model inherits BaseModel and which then has a
> modelform created from it.
>
> Can anyone offer any clues as to how to fix this little problem.
>
> Thanks
>
> Simon

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to