Browse Source

Merge pull request #21555 from ITJamie/patch-3

Add changelog message documentation in custom scripts
bctiemann 1 day ago
parent
commit
2e4bce2dad
1 changed files with 1 additions and 0 deletions
  1. 1 0
      docs/customization/custom-scripts.md

+ 1 - 0
docs/customization/custom-scripts.md

@@ -215,6 +215,7 @@ if obj.pk and hasattr(obj, 'snapshot'):
     obj.snapshot()
 
 obj.property = "New Value"
+obj._changelog_message = 'Example Message Text' # Optional
 obj.full_clean()
 obj.save()
 ```