Both StackedInline and TabularInline are classes that inherit from InlineModelAdmin, replacing the template attribute. You could create your own Inline class specifying a different template to do the layout however your wish.
Thank you for your suggestion!
finally I cloned tabular.html file in my admin template since it seemed more simple and called it in this way:
from django.contrib.admin.options import InlineModelAdmin
class TabularInlineResponsive(InlineModelAdmin):
template = 'admin/edit_inline/tabular_responsive.html'
and it seems to work. Here is my tabular_responsive.html file.
Do you think we can do better?
Cool! I’ll admit to being a little surprised to see that you’re using a table rather than div given your original question mentions losing responsiveness, but if it works for you, great!
(I am most definitely not the person to ask for opinions regarding templates or any other front-end issues. I may know the mechanics and components, but I don’t have an eye for design or style.)