I want to customize django admin.. For additing I did this :
class SomeAdmin(admin.ModelAdmin):
"""
Customized admin template and corresponding
views for adding media.
"""
add_form_template = "admin/add.html"
def add_view(self, request, form_url='', extra_context=None):
if request.method == "POST":
//YOur logic
return super(SomeAdmin,self).add_view(request)
Its working fine.. In the same way how can I get custom list view and custom change view ?
Any help ?
ModelAdmin has both the change_view() and changelist_view() methods so you can override them the same way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With