I have never used an m2m field like this, so thanks! I learned something new.
I found 2 ways to get around the problem:
1: just reassign the __unicode__ function __unicode__ new function
class MyInline(admin.TabularInline): MyModel.m2m.through.__unicode__ = lambda x: 'My New Unicode' model = MyModel.m2m.through
2: configure the proxy model for m2m.through model and use this model instead
class MyThrough(MyModel.m2m.through): class Meta: proxy = True def __unicode__(self): return "My New Unicode" class MyInline(admin.TabularInline): model = MyThrough
Yuji 'Tomita' Tomita
source share