handle relations in show mode

fix #306

porting the configuration for show templates from the orm admin.