I dont know what db.UserProperty() is but my guess is that that's
something related to the model.
Your form doesn't understand that so it defaults to None.
If you omit the field owner from the form, perhaps the form won't
attempt to fiddle with this and then the model is allowed to do it's
magic.
Something like this:

class ContactForm(forms.ModelForm):
    class Meta:
        model = Contact
        exclude = ('owner',)


On Sep 13, 9:06 am, Peter Newman <peter.newman....@googlemail.com>
wrote:
> Guys -
>
> I have
> class Contact(db.Model):
>     person = db.ReferenceProperty(Person)
>     contact_date = db.DateTimeProperty(auto_now_add=True)
>     remarks = db.TextProperty()
>     owner = db.UserProperty(auto_current_user_add=True)
>
> and a simple form
> class ContactForm(forms.ModelForm):
>     class Meta:
>         model = Contact
>
> but when i add a record owner remains None??? what am i doing wrong?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to