Initial commit

This commit is contained in:
2020-11-13 15:31:14 +01:00
parent 2af942da5a
commit 10e2a34143
103 changed files with 3609 additions and 0 deletions

View File

@ -0,0 +1,20 @@
from django.db import models
from django.utils.translation import gettext_lazy as _
class MetaDataModel(models.Model):
"""
This is an abstract Django model with some general meta fields that can be used for other models.
Attributes
----------
created_at : datetime
The date and time when the model has been created. This will be automatically set once during creating.
updated_at : datetime
The date and time when the model has been updated. This will be automatically updated when the model is updated.
"""
created_at = models.DateTimeField(_('Date created'),auto_now_add=True, help_text=_('The date and time this model has been created'))
updated_at = models.DateTimeField(_('Date updated'),auto_now=True, help_text=_('The date and time this model has been updated'))
class Meta:
abstract = True