django - writing a generic listview template to use across different models -


i new django , looking generic way of displaying records of model in view writing minimum html.

so ideally define model example customer, add fields first name, address, credit card no. mark of these fields rendered ( publicly_visible = false credit card field). repeat model 'products'. next want view customer render list of customer records (the credit card column not rendered).

i wondering if there django package me?

the other option trying try use generic listview not sure how proceed.

meet django's "class based views".

you can read docs here django docs on cbv, there several generic views accomplish repetitve tasks.

the view you're looking regarding question called listview.


Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -