I have a model which has several related models which are related via a
one to many relationshiop. These would look like
class Parent(models.Model):
field1 = ...
field3 = ...
field4 = ...
class Admin:
fields = (
('Section 1', {
'fields': ('field1', )
}),
('Section 3', {
'fields': ('field3', )
}),
('Section 4', {
'fields': ('field5', )
}),
)
class Child2(models.Model):
...
fk = models.ForeignKey(Parent, edit_inline=TABULAR,
max_num_in_admin=2, num_in_admin=2, num_extra_on_change=2, core=True)
class Child4(models.Model):
...
fk = models.ForeignKey(Parent, edit_inline=TABULAR,
max_num_in_admin=2, num_in_admin=2, num_extra_on_change=2, core=True)
Is there a way to set the order the sections are displayed? The inline
edit sections are displayed after the fields are displayed. I'd like to
display field1 then the edit_inline section for child2 then field3 and
so on. I can't figure any way to specify the order for these sections.
I do see in django\contrib\admin\templates\admin\change_form.html there
is a block hat deals with bound_field_set then another that deals with
inline_related_objects. I'm guessing this template would need to be
modified to suit my form structure. Is this so or is there another way
to deal with this?
Navin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---