I have the following problem. I have a contact class that different users can tag with their own topics:
class Contact(db.Model):
contact_date = db.DateProperty(auto_now_add=True)
remarks = db.TextProperty()
topic = db.ReferenceProperty(Topic)
class Topic(db.Model):
topic = db.StringProperty(required=True)
description = db.TextProperty()
owner = db.ReferenceProperty(User, collection_name='topic_set')
def __unicode__(self):
return '%s' % (self.topic)
In the form for this i want to only show the Topics for a certain user
class ContactForm(forms.ModelForm):
def __init__(self, user_filter, *args, **kwargs):
self.base_fields['topic'].queryset = Topic.all().filter('owner
= ', user_filter)
super(ContactForm, self).__init__(*args, **kwargs)
I then call the ContactForm from the view as follows:
form = ContactForm(user_filter = request.user.key())
This all works as expected. However when I submit the form I get:
Caught an exception while rendering: Unsupported type for property :
<class 'django.http.QueryDict'>
Am I doing something wrong? Is this some problem with appengine django implementation? Peter