How do I get Django admin to display groups horizontally? If I have 3 adjacent datetime fields, I'd rather them take up 1 row, not 3.
A:
The way I've done it is to make a custom admin template. You can just take the one that comes with django, copy it, and edit the parts you want changed.
A good tutorial on how to do that is on the django site. Specifically, there is a part on making a custom admin template.
landyman
2009-04-21 19:56:29
This technique can be useful for advanced stuff, but there is no reason to do it just to put several fields on the same line. Just group your fieldsets into tuples, as shown in andybak's answer.
Carl Meyer
2009-04-22 14:51:04
+3
A:
Have you tried grouping your fieldsets into tuples?:
fieldsets = (
(None, {
'fields': ('name','description',('start_date','end_date'), 'location', ('latitude','longitude'))
}),
)
andybak
2009-04-22 09:28:39