Phantom update in Django admin
After clicking 'Save' to update a particular model in Django admin, I am returned back to the list view with a message stating that 'The [model] was changed successfully.'. The issue is that the model was not changed. The list view which contains the column I updated does not reflect the modified text.
I have over-written the model's Save method to include a print statement as well as a call to it's parent class.
def save(self, *args, **kwargs):
print 'boom!'
super(Blurb, self).save(*args, **kwargs)
开发者_开发知识库The model's Save method is not called (no 'boom!' output to the console). I have no issue adding new data to this model, it's just the update that does not work.
Any ideas on what the issue may be, or at least how I could debug it further?
Just turning Yuji's comment into an actual answer:
If you have phantom edits, you might want to check the ModelAdmin save_model() method.
精彩评论