Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • 3
    Whilst not a duplicate of this question, it's worth highlighting it. What to call the flag is a minor issue compared with the whole (bad) idea of introducing a flag in the first place. Just don't do it. Commented Mar 27, 2019 at 11:17
  • The context is that I have some auto updating of a field in a django model .save(), and I'd like to be able to not have it happen if for whatever reason I'm in the shell putting out fires, and don't want the updating to happen. Commented Mar 27, 2019 at 11:21
  • I'm not really sure I understood context correctly, but overriding django base save doesn't sound like something you want to do especially to disable something. Could you ask a question about your original problem, possibly on SO, so we could help the best way possible ? Commented Mar 27, 2019 at 12:22
  • Overriding of those methods is exactly what you're meant to do. I've added automatic updating of a field in .save(), and have added the flag in question to the arguments to bypass the updating should one need to. Commented Mar 27, 2019 at 13:09
  • Ok, I understand better now. For some reason I thought you wanted to disable an update in django. Well my answer is the best I can provide you. Commented Mar 27, 2019 at 15:44