Not to render all columns in UI Django HTML Template

In my UI I can see all the columns as default. I do not want to view all the columns in my UI, how do do that?

In this picture I have four columns by default I do not want to view EMAIL as the default

First of all, please mention if you are talking about the admin interface or something you've built on your own.

My answer will solve your problem for the admin interface.

Let's suppose in the admin.py file, you've created a view for a particular model named Users, with the following fields:

  1. pet_name
  2. parent_name
  3. last_visit

So, the class Users should ve something like below.

@admin.register(Customer)
class Users(admin.ModelAdmin):
    list_display = ['pet_name', 'parent_name', 'last_visit']

You should rename the list items according to what you've set in your model.

Back to Top