Ticket #13693: error_messages.diff

File error_messages.diff, 777 bytes (added by furagu, 14 years ago)
  • django/db/models/fields/__init__.py

     
    417417
    418418    def formfield(self, form_class=forms.CharField, **kwargs):
    419419        "Returns a django.forms.Field instance for this database Field."
    420         defaults = {'required': not self.blank, 'label': capfirst(self.verbose_name), 'help_text': self.help_text}
     420        defaults = {'required': not self.blank, 'label': capfirst(self.verbose_name), 'help_text': self.help_text, 'error_messages': self.error_messages}
    421421        if self.has_default():
    422422            if callable(self.default):
    423423                defaults['initial'] = self.default
Back to Top