Customizing the Django Admin
1) Go to admin.py file
2) Name of the class {modelname}Admin
3) admin.site.register({modelname},{modelname}Admin)
4) Save & go to admin page of your webapp.
-------------Code----------------
class bookAdmin(admin.ModelAdmin):
search_fields=['title'] #to search in table (You can add any number of fields to search)
fields=['isbn','title','price','desc'] #for order of fields (Sequence of fields)
list_display=['isbn','title','Category','price'] #for list view
list_editable=['price'] #to edit fields in list view (field should be in list_display)
list_filter=['Category','author'] #for filter
admin.site.register(book,bookAdmin)
----------------------------------------------------------------------------------------------------------------------
Contact: [email protected]
https://www.bbtpoint.com/