【发布时间】:2011-05-31 16:54:25
【问题描述】:
每当我在管理界面中保存模型时,它都会显示通常的“成功保存消息”。 但是,我想知道是否可以自定义此消息,因为我想警告用户他刚刚保存的内容以及这些操作的含义。
class PlanInlineFormset(forms.models.BaseInlineFormset):
def clean(self):
### How can I detect the changes?
### (self.changed_data doesn't work because it's an inline)
### and display what he/she just changed at the top AFTER the successful save?
class PlanInline(admin.TabularInline):
model = Plan
formset = PlanInlineFormset
【问题讨论】:
标签: django django-forms django-admin django-messages