开发者

Django admin editing fields in a tabular fashion

I have a model wi开发者_Python百科th lots of say CharField fields, that I would like to edit in the admin.

The problem is that each field takes up one line. How should I make them display like this (horizontally):

Django admin editing fields in a tabular fashion

(source: djangoproject.com)

(they are not foreign keys)


Django 1.2 has ListEdit extension for the Admin

This is how you use it:

class AccountAdmin(admin.ModelAdmin):
     list_display = ( 'Name','Type')
     list_editable = ( 'Type', )

And this is how it looks like:

Django admin editing fields in a tabular fashion


(source: v-lad.org)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜