Permalink
Browse files

Make the details tables in changelist look the same.

  • Loading branch information...
1 parent 8b9438d commit 26d1b28c09ae2c7102a191f3d6a93f3a570957a3 @ionelmc committed Nov 4, 2011
Showing with 11 additions and 1 deletion.
  1. +5 −1 src/redisboard/admin.py
  2. +6 −0 src/redisboard/static/redisboard/admin.css
View
6 src/redisboard/admin.py
@@ -10,6 +10,10 @@
from .views import inspect
class RedisServerAdmin(admin.ModelAdmin):
+ class Media:
+ css = {
+ 'all': ('redisboard/admin.css',)
+ }
list_display = (
'__unicode__', 'status', 'memory', 'clients', 'details', 'tools'
)
@@ -34,7 +38,7 @@ def tools(self, obj):
tools.long_description = _("Tools")
def details(self, obj):
- return "<table>%s</table>" % ''.join(
+ return '<table class="details">%s</table>' % ''.join(
"<tr><td>%s</td><td>%s</td></tr>" % i for i in
obj.stats['brief_details'].items()
)
View
6 src/redisboard/static/redisboard/admin.css
@@ -14,3 +14,9 @@
.inspect-form td:nth-child(n+2) {
text-align: center;
}
+.inspect-form td:nth-child(n+2) {
+ text-align: center;
+}
+.details td {
+ width: 50%;
+}

0 comments on commit 26d1b28

Please sign in to comment.