coleifer/flask-peewee — Issue #15: foreign key related columns in ModelAdmin derived class?
Author: davidthewatson
Created: 2011-12-21 13:53:29+00:00
State: open

I am defining a ModelAdmin class, but I need to include foreign-key related objects in the table. Is there a way to achieve this?

These don't work:

class WhateverAdmin(ModelAdmin):
columns = ('whatever', 'whatever.foreign_key',)

or

class WhateverAdmin(ModelAdmin):
columns = ('whatever', 'whatever.foreign_key'.field,)

Thanks,
David