[Django]-Customisations to the TabularInline in Django

6👍

Why not just override the admin template to add some CSS ?

For example, in templates/admin/testapp/author/change_form.html:

{% extends 'admin/change_form.html' %}

{% block content %}
    <style type="text/css">
    fieldset.module td.original p { display:none; }
    </style>
    {{ block.super }}
{% endblock %}

You may do that globally, per app or per model.

It works and seems pretty safe, unlike overriding the fieldset template itself – which makes sense to avoid doing.

👤jpic

1👍

You cah hide “Book object” links with some JS added to the AdminSite. It should be something like:

django.jQuery('.dynamic-phone_set h3').hide();
👤ilvar

Leave a comment