title: Making Django forms.DateField show use local date format
body: <p>I'm trying to find an easy way to build forms which show dates in the Australian format (dd/mm/yyyy).  This was the only way I could find to do it.  It seems like there should be a better solution.  </p>
  
  <p>Things to note:</p>
  
  <ul>
  <li>Created a new widget which renders date value in dd/mm/yyyy format</li>
  <li>Created new date field to prepend the locate date format string to the list of values it tries to use </li>
  </ul>
  
  <p>I imagine the ideal solution would be a datefield which automatically localised but that didn't work for me (strftime didn't seem to be unicode friendly but I didn't try very hard)</p>
  
  <p>Am I missing something?  Is there a more elegant solution?  Is this a robust approach?</p>
  
  <pre><code>from models import *
  from django import forms
  import datetime
  
  class MyDateWidget(forms.TextInput):
  
      def render(self, name, value, attrs=None):
  
              if isinstance(value, datetime.date):
                      value=value.strftime("%d/%m/%Y")
  
              return super(MyDateWidget, self).render(name, value, attrs)
  
  
  class MyDateField(forms.DateField):
  
      widget = MyDateWidget
  
      def __init__(self, *args, **kwargs):
              super(MyDateField, self).__init__(*args, **kwargs)
              self.input_formats = ("%d/%m/%Y",)+(self.input_formats)
  
  
  class ExampleForm(ModelForm):
      class Meta: 
              model=MyModel
              fields=('name', 'date_of_birth')
  
      date_of_birth = MyDateField()
  </code></pre>