Hello Danfi, thanks alot for your reply. I've just found another solution using a custom form for the inline like this:
from django.forms import ModelForm from django.contrib.contenttypes import generic class BarInlineForm(ModelForm): class Meta: model = Bar fields = ['field3', 'field2', 'field1'] class BarInline(generic.GenericTabularInline): model = Bar form = BarInlineForm Best Regards, Dirk Eschler Am Freitag 21 Mai 2010, 10:57:27 schrieb Danfi: > use filedsets can dispaly them in that way , but it looks differently > > from django.contrib import admin > from models import * > > class BarAdmin(admin.ModelAdmin): > fieldsets = [ > (None, { > 'classes': ('field3',), > 'fields': ['field3'] > }), > (None, { > 'classes': ('field2',), > 'fields': ['field2'] > }), > (None, { > 'classes': ('field1',), > 'fields': ['field1'] > }), > ] > > admin.site.register(Bar,BarAdmin) > > On 5月20日, 下午6时27分, Dirk Eschler <esch...@gmail.com> wrote: > > Hello, > > > > is there an easy way to reorder field display in a tabular admin inline, > > like fieldsets for common admin forms? > > > > Consider the following models, with Bar being edited inline: > > > > class Foo(models.Model): > > field1 = models.CharField(max_length=255) > > field2 = models.CharField(max_length=255) > > > > class Meta: > > abstract = True > > > > class Bar(Foo): > > field3 = models.CharField(max_length=255) > > > > This will result in an display order of [field1, field2, field3], while i > > want it be ordered like [field3, field1, field2] or [field3, field2, > > field1]. Since Foo is abstract, i can't just swap the definition order > > to achieve this. > > > > Best Regards, > > Dirk Eschler > > > > -- > > Dirk Eschler <esch...@gmail.com> > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. To post to this group, send email to > > django-us...@googlegroups.com. To unsubscribe from this group, send > > email to django-users+unsubscr...@googlegroups.com. For more options, > > visit this group athttp://groups.google.com/group/django-users?hl=en. -- Dirk Eschler <esch...@gmail.com> -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.