#13735: Broken table layout if content is too large ------------------------------------+------------------------------- Reporter: tonnzor | Owner: nobody Type: Bug | Status: new Milestone: | Component: contrib.admin Version: 1.2 | Severity: Normal Resolution: | Keywords: Triage Stage: Accepted | Has patch: 1 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 1 | ------------------------------------+------------------------------- Changes (by julien):
* has_patch: 0 => 1 Comment: Here's a test case: {{{#!python # models.py: from datetime import datetime from django.db import models class MyModel(models.Model): a = models.CharField(choices=(('draft', 'Draft'), ('published', 'Published')), default='draft', max_length=50) b = models.DateTimeField(default=datetime.now) c = models.DateTimeField(default=datetime.now) d = models.DateTimeField(default=datetime.now) e = models.DateTimeField(default=datetime.now) f = models.DateTimeField(default=datetime.now) g = models.DateTimeField(default=datetime.now) h = models.DateTimeField(default=datetime.now) i = models.DateTimeField(default=datetime.now) j = models.DateTimeField(default=datetime.now) # admin.py: from django.contrib import admin from .models import MyModel class MyModelAdmin(admin.ModelAdmin): list_display = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'] list_filter = ['a'] admin.site.register(MyModel, MyModelAdmin) }}} Note that this is not a problem with the filter but with the results' table itself -- that is, the problem is present whether or not there is a filter. More specifically, the problem comes from the fact that certain types of data (time, date and FK) get a `nowrap` class, preventing the content of the cell to wrap and adapt to the available width space. See #11447, for example, to see the necessity for that non-wrapping. I've attached one possible fix making a horizontal bar appear if the table's content can't fit in the page. -- Ticket URL: <https://code.djangoproject.com/ticket/13735#comment:7> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.