From 4c6bb93770cd2a4acb10b83a83458bb821ebafee Mon Sep 17 00:00:00 2001
From: David Fischer <david.fischer.ch@gmail.com>
Date: Wed, 30 Oct 2013 15:41:41 +0100
Subject: [PATCH] Add the object to data used for the message
---
django/contrib/messages/views.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/django/contrib/messages/views.py b/django/contrib/messages/views.py
index 3c2ca35..a0e3bd6 100644
a
|
b
|
class SuccessMessageMixin(object):
|
15 | 15 | return response |
16 | 16 | |
17 | 17 | def get_success_message(self, cleaned_data): |
| 18 | if hasattr(self, 'object'): |
| 19 | cleaned_data['object'] = self.object |
18 | 20 | return self.success_message % cleaned_data |