﻿id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 27638 Rollback data changes made inside templates vinay karanam nobody "Current implementation to prevent data changes within templates relies on the attribute `alters_data = True`. By default this is set for all `Model`, `QuerySet` and `ModelForm` methods that can alter data. But if someone overrides these methods, they need to explicitly set this attribute again. It is common to override `save` method and not set this attribute. Even a lot of popular third-party packages endup making this mistake. I propose that we rollback any data changes that are done during template rendering. Either by savepoint rollback or by setting autocommit to `False` during rendering. " Cleanup/optimization closed Template system dev Normal wontfix Someday/Maybe 0 0 0 0 0 0