I have a custom form displaying ModelForm instance values like so:
<input type="text" name="test" value="{{
form.test.value|default_if_none:''|date:'m/d/Y' }}">
It works fine displaying the value the first time the form is loaded and
saving it in the database. The problem arises when the form fails
validation on any field - the field becomes blank. Other fields are not
affected. This is not happening when I remove the formatting.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/fe05e8ab-4327-472c-8bef-3711e60fa9ff%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.