Ticket #289: precise-errors.diff
File precise-errors.diff, 1.8 KB (added by , 19 years ago) |
---|
-
main.py
7 7 from django.utils.html import strip_tags 8 8 from django.utils.httpwrappers import HttpResponse, HttpResponseRedirect 9 9 from django.utils.text import capfirst, get_text_list 10 from django.conf.settings import ADMIN_MEDIA_PREFIX 10 from django.conf.settings import ADMIN_MEDIA_PREFIX, DATETIME_FORMAT 11 11 import operator 12 12 13 13 # Text to display within changelist table cells if the value is blank. … … 399 399 elif isinstance(f, meta.DateField): 400 400 if field_val: 401 401 if isinstance(f, meta.DateTimeField): 402 result_repr = dateformat.format(field_val, 'N j, Y, P')402 result_repr = dateformat.format(field_val, DATETIME_FORMAT) 403 403 else: 404 404 result_repr = dateformat.format(field_val, 'N j, Y') 405 405 else: … … 588 588 t.append('{% if is_popup %}<input type="hidden" name="_popup" value="1">{% endif %}') 589 589 if opts.admin.save_on_top: 590 590 t.extend(_get_submit_row_template(opts, app_label, add, change, show_delete, ordered_objects)) 591 t.append('{% if form.error_dict %}<p class="errornote">Please correct the error{{ form.error_dict.items|pluralize }} below .</p>{% endif %}\n')591 t.append('{% if form.error_dict %}<p class="errornote">Please correct the error{{ form.error_dict.items|pluralize }} below (in: {% for error in form.error_dict.keys %}{{ error }}{% if forloop.last %}{% else %}, {% endif %}{% endfor %}).</p>{% endif %}\n') 592 592 for fieldset_name, options in admin_field_objs: 593 593 t.append('<fieldset class="module aligned %s">\n\n' % options.get('classes', '')) 594 594 if fieldset_name: