kmmbvnr / django-material

Material Design for Django

Home Page:http://viewflow.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Material ModelViewSet DetailModelView: Limit the model fields shown in the details page

RAJKRIS opened this issue · comments

It seems that the DetailModelView currently does not have to provision to hide fields. It always shows the all the fields of a model in the detail page.

We can use get_object_data method to override the fields to be displayed. But this doesn't seem to be a straightforward way.

Please advise if I am missing something.

Django-material version: 1.5.6

The best way to override object representation in the detail view is to override the view template http://docs.viewflow.io/frontend_crud.html#material.frontend.views.DetailModelView.get_template_names