has_changed as property

54 views
Skip to first unread message

Sven R. Kunze

unread,
Sep 29, 2016, 9:40:38 AM9/29/16
to Django developers (Contributions to Django itself)
Good afternoon,


It's is not as security relevant as is_authenticated but the remaining arguments of "is_authenticated as property" still hold. I also suggest the usage of CallableBool as a good temporary backwards-compatibility measure.

Best
Sven


NOTE: this one hid an especially annoying bug (also performance-wise) in production for us.

Tim Graham

unread,
Sep 29, 2016, 9:56:18 AM9/29/16
to Django developers (Contributions to Django itself)
Unless there are different arguments for has_changed vs. is_valid, I suggest we discuss both attributes on the nearly identical "is_valid as property" thread.

Sven R. Kunze

unread,
Sep 29, 2016, 11:18:35 AM9/29/16
to Django developers (Contributions to Django itself)
That's works for me.

Sven R. Kunze

unread,
Sep 29, 2016, 11:27:35 AM9/29/16
to Django developers (Contributions to Django itself)
One additional note: has_changed is a lot more subtle than is_valid because it is used less often than is_valid (checked by grepping through our sources).
Reply all
Reply to author
Forward
0 new messages