Custom script - filter changelob between dates #15565
Answered
by
zmaster7
ziggekatten
asked this question in
Help Wanted!
-
I need to do some large scale fix, and need to get the data from the changelog between specfic time points and programatically revert some changes, In effect: I would like to do an ObjectChange.objects.filter() with a date greater that x, and less than y. I can't for my life figure out how to do that. |
Beta Was this translation helpful? Give feedback.
Answered by
zmaster7
Apr 1, 2024
Replies: 1 comment
-
Your variables to filter on need to be in datetime format, and then you can filter on time__lte and time__gte. Here's a quick example (filtered between 1/1/2020-present):
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ziggekatten
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Your variables to filter on need to be in datetime format, and then you can filter on time__lte and time__gte.
Here's a quick example (filtered between 1/1/2020-present):