Getting closer. This works: product.period_start_date.strftime('%d-%m-%Y')
But I definitely do not want this in all view handlers. It should go in the
model .. or the modelform.
Thanx again!
Gerard.
Gerard Petersen wrote:
> Hi all,
>
> I'm trying to have a formfield filled with a correlctly formatted date value.
>
> Validation is already in place. It only accepts "dd-mm-yyyy" on submitting
> but when it gets the existing value from the model it shows it in the
> formfield like "yyyy-mm-dd"
>
> So the sequence is almost complete. But where do I format the value so the
> formfield shows the correct formatted value when editing. In the model, the
> form or the view method?
>
> Thanx a lot.
>
> Gerard.
>
>
--
urls = { 'fun': 'www.zonderbroodje.nl', 'tech': 'www.gp-net.nl' }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---