#24470: Serialization of base classes is not customizable for migrations
-------------------------------+--------------------------------------
     Reporter:  rockymeza      |                    Owner:  nobody
         Type:  Uncategorized  |                   Status:  new
    Component:  Migrations     |                  Version:  1.7
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------
Changes (by charettes):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 Can't you simply define your factored mixin at the module level?

 {{{#!python
 from django.db import models


 def model_mixin_factory(name):
     class cls(object):
         pass
     cls.__name__ = name
     return cls

 MyMixin = model_mixin_factory('MyMixin')


 class MyModel(MyMixin, models.Model):
     pass
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24470#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.f659abe5ea7d7b46034c0bf69ce5778d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to