﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
5767	EmailField should render as a mailto anchor in admin list page	hax	nobody	"It seems to me that there is no reason to not have an EmailField be a mailto link in an admin interface.  These interfaces generally aren't public, so hiding from spambots shouldn't be an issue.

This is my first attempt at a patch, feedback is appreciated :)

{{{
Index: django/contrib/admin/templatetags/admin_list.py
===================================================================
--- django/contrib/admin/templatetags/admin_list.py     (revision 6525)
+++ django/contrib/admin/templatetags/admin_list.py     (working copy)
@@ -177,6 +177,12 @@
                     result_repr = ('%%.%sf' % f.decimal_places) % field_val
                 else:
                     result_repr = EMPTY_CHANGELIST_VALUE
+            # EmailFields are mailto links
+            elif isinstance(f, models.EmailField):
+                if field_val is not None:
+                    result_repr = '<a href=""mailto:%s"">%s</a>' % (escape(field_val), escape(field_val))
+                else:
+                    result_repr = EMPTY_CHANGELIST_VALUE
             # Fields with choices are special: Use the representation
             # of the choice.
             elif f.choices:

}}}


--maqr"		closed	contrib.admin	newforms-admin		wontfix	nfa-someday EmailField		Design decision needed	1	0	0	1	0	0
