Nikolay Cherniy
Nikolay Cherniy
I think it would be more clear if the default value will be "id", cause every model has field "id" from the stock, and doesn't have field "pk". Or pk...
It works only with model attribute "pk" for example ``` User = get_user_model() User.objects.create(...) User.objects.first().pk ``` works as you expect, but for get_field that doesn't work: ``` User._meta.get_field("pk") django.core.exceptions.FieldDoesNotExist: User...
``` class Parent(models.Model): history = HistoricalRecords() class Child(Parent): class Meta: proxy = True def save(self, *args, **kwargs): self.__class__ = Parent super(Parent, self).save(*args, **kwargs) self.__class__ = Child