diff options
| author | Preston Holmes <preston@ptone.com> | 2012-11-17 22:53:31 +0100 |
|---|---|---|
| committer | Preston Holmes <preston@ptone.com> | 2012-11-19 16:03:09 -0800 |
| commit | edf7ad36faab8d45aafe1f96feaf46794de22fc1 (patch) | |
| tree | cbafab6d93982161f9d1520e4781a7452c0e9987 /docs/ref/contrib/admin/actions.txt | |
| parent | 8b659e439b51953064a7a79924b4066e08d7127d (diff) | |
Fixed #18658 -- Improved ModelAdmin.message_user API
Thanks to Lowe Thiderman for the patch and tests
Diffstat (limited to 'docs/ref/contrib/admin/actions.txt')
| -rw-r--r-- | docs/ref/contrib/admin/actions.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/ref/contrib/admin/actions.txt b/docs/ref/contrib/admin/actions.txt index 3f3b52983b..d7eef623d5 100644 --- a/docs/ref/contrib/admin/actions.txt +++ b/docs/ref/contrib/admin/actions.txt @@ -140,6 +140,15 @@ That's really all there is to it! If you're itching to write your own actions, you now know enough to get started. The rest of this document just covers more advanced techniques. +Handling errors in actions +-------------------------- + +If there are foreseeable error conditions that may occur while running your +action, you should gracefully inform the user of the problem. This means +handling exceptions and and using +:meth:`django.contrib.admin.ModelAdmin.message_user` to display a user friendly +description of the problem in the response. + Advanced action techniques ========================== |
