On 14 Sep, 09:24, Peter Newman
wrote:
> Ok i am a bit further. The above only works with Google's
> authentication. However I want to use Django authentication. Is there
> a way to add the current user to the model during creation of the
> entity? There must be something similar as auro_current
Ok i am a bit further. The above only works with Google's
authentication. However I want to use Django authentication. Is there
a way to add the current user to the model during creation of the
entity? There must be something similar as auro_current_user_add you
would think?
On Sep 13, 4:55 pm, P
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.
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:
4 matches
Mail list logo