yes, can access thru the form.instance
{{ form.instance.dob }}
On Dec 4, 6:55 pm, Alex <[email protected]> wrote:
> Hi,
> The gae doc says 'DateTime fields with auto_now or auto_now_add set to
> true are automatically not displayed' in django forms. Is there some
> way I can access these date values through the form to display them
> even though they are readonly.
>
> I am using code such as this:
>
> form = datamodel.MyForm(instance=myinstance)
> path = os.path.join(os.path.dirname(__file__), 'html/
> formMyForm.html')
> self.response.out.write(template.render(path, {'form':form}))
>
> 'myinstance' contains a field:
>
> dob = db.DateTimeProperty(auto_now_add = True)
>
> Is there a way to get 'dob' into my 'form' to render in the html with
> {{ form.dob }} ? I would also like it to be subject to my own date
> widget code for rendering as any date input field in the application.
>
> Thanks
> Alex
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.