def Person开发者_运维知识库(models.Model)
name = models.CharField(max_length=50)
birth_date = models.DateField()
and I have this form
def PersonForm(forms.ModelForm)
class Meta:
model = Person
I have to localize the project to spanish (es), and add a customized format module (FORMAT_MODULE_PATH) to set DATE_FORMAT = 'd/m/Y'. Everything works fine if I only show dates in the template, but when the form is diplayed with data from the database, the input control show the date as Y-m-d
How can I fix that?
精彩评论