Guys -
I have a slight issue with dates in Django and appengine:
I have the following class because i want date input in the form of DD/
MM/YY
class MyForm(ModelForm):
mydate = forms.DateTimeField(input_formats=['%d-%m-%y', '%d/%m/
%y'])
class Meta:
model = MyObject
This
pt 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
>
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:
3 matches
Mail list logo