id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 23574 Makemigrations tries to migrate non-model classes Christian Peters nobody "If your model extends non-model classes, the migration fails with: raise ValueError(""Cannot serialize: %r\nThere are some values Django cannot serialize into migration files.\nFor more, see https://docs.djangoproject.com/en/dev/topics/migrations/#migration-serializin The reason is that before adding the base classes there is no check if the base class is indeed a django model: https://github.com/django/django/blob/master/django/db/migrations/autodetector.py#L495-505 Solution: Check if the base class is an instance of django.db.model before adding it. Context: I have Models with some mixins that just add method and functionality that is shared among multiple models, e.g. an InvoiceMixin, that is shared by multiple models to enrich them with convenience methods." Bug closed Migrations 1.7 Normal invalid Unreviewed 0 0 0 0 0 0