Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2026 Crash Course
NEET 2026 Crash Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
76 views
in Python by (178k points)
How can I customize the Django Admin interface?

Please log in or register to answer this question.

1 Answer

0 votes
by (178k points)

Django Admin allows for extensive customization. You can modify the appearance, behavior, and functionality of the admin site by subclassing the default admin classes and overriding their attributes and methods.

Example code:

# admin.py
from django.contrib import admin
from .models import MyModel

class MyModelAdmin(admin.ModelAdmin):
    list_display = ('name', 'description')  # Customize the displayed fields
    list_filter = ('created_at',)          # Add a filter for 'created_at' field
    search_fields = ('name',)              # Add a search box for 'name' field

admin.site.register(MyModel, MyModelAdmin)  # Register the model with custom admin options
 

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...