Skip to content

auto_now_add instead of overriding save method. #3

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

Open
wants to merge 2 commits into
base: py3
Choose a base branch
from
Open

auto_now_add instead of overriding save method. #3

wants to merge 2 commits into from

Conversation

marcorichetta
Copy link

Django provides a way to save datetime fields on model creation. This is less error prone and also cleaner!

I think unicode is from an old version of Django. Now the convention is to use str.

Django provides a way to [save datetime fields on model creation](https://docs.djangoproject.com/en/3.1/ref/models/fields/#django.db.models.DateField.auto_now_add). This is less error prone and also cleaner!

I think unicode is from an old version of Django. Now the convention is to use [__str__](https://docs.djangoproject.com/en/3.1/ref/models/instances/#django.db.models.Model.__str__)
@marcorichetta marcorichetta changed the base branch from master to py3 March 2, 2021 16:53
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.

1 participant