Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better to use auto_now_add for that field #119

Closed
wants to merge 1 commit into from

Conversation

spapas
Copy link

@spapas spapas commented Jan 11, 2023

No description provided.

@RadoRado
Copy link
Member

Hm, there's actually a slight difference in behavior.

Using auto_now_add and auto_now means the values cannot be overridden (when using .save()) 🤔

Let me think about that.

@RadoRado
Copy link
Member

Actually, thank you for suggesting that change.

It triggered a blog article, that's going to come out in the next few days 😄

Examples / exploration is here - HackSoftware/Django-Styleguide-Example#315

@RadoRado
Copy link
Member

@spapas We have a new blog article on that topic - https://www.hacksoft.io/blog/timestamps-in-django-exploring-auto-now-auto-now-add-and-default 👌

I'll close the PR for now, until we apply changes to the styleguide example & then apply them here.

Thanks for opening this!

@RadoRado RadoRado closed this Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants