Length of Autocomplete Lookups in Tabular Inlines

Skip to first unread message

David Binetti

Oct 22, 2015, 1:42:44 AM10/22/15
to Django Grappelli
I am using Autocomplete lookups, which is working flawlessly.  However, when also using with a sortable inline I have a problem.  

I have very long strings for my __unicode__ representations, and they don't fully render even though there is a ton of extra horizontal space available (see attached screen shot).  This means that the useful bits are not rendered, leaving me with a list of objects that appear identical and require me to click in each individually to determine which is which when reordering.  needless to say, this is very painful.

Is there a straightforward way to expand the length of the Lookup box?  Or do I need to fork and override the templates?


Screenshot 2015-10-21 22.08.15.png


Oct 22, 2015, 1:50:20 AM10/22/15
to Django Grappelli
From a design point of view the width of tabulars has to be limited (as we don't know how many cells, which contents, which witdh available etc.).

You can add some custom css to adapt the width to your specific needs by using a Media inner class on your ModelAdmin (see https://docs.djangoproject.com/en/dev/ref/contrib/admin/#modeladmin-asset-definitions).
Reply all
Reply to author
0 new messages