Open melboone opened 1 year ago
+1
My code looks like this, I use this model as mixin for many models in my apps.
class Administrable(models.Model):
"""An administrable model."""
created_by = CurrentUserField(
verbose_name=_("Created by"),
related_name="%(app_label)s_%(class)s_creator",
)
updated_by = CurrentUserField(
verbose_name=_("Updated by"),
related_name="%(app_label)s_%(class)s_updater",
on_update=True,
)
class Meta:
"""Metaclass for :class:`Administrable`."""
abstract = True
Getting this error on migration:
UserWarning: You passed an argument to CurrentUserField that will be ignored. Avoid args and following kwargs: default, null, to. warnings.warn(self.warning)