[Django]-Automatically assigning model field values in Django

6👍

Yes, there is a way. From Django docs:

Field.default

The default value for
the field. This can be a value or a
callable object. If callable it will
be called every time a new object is
created.

👤shanyu

Leave a comment