Well, the template is what controls the ordering of fields.  You can create
your own template that Django will then use in the admin interface.  From
there you can control exactly how things are displayed.
On Dec 11, 2010 1:30 PM, "mongoose" <darrenma1...@gmail.com> wrote:
> Hi wayne,
>
> to be honest I've no idea how i'd do that by overriding a template.
>
> On Dec 11, 7:20 pm, wayne <wayne.tuxro...@gmail.com> wrote:
>> On Dec 11, 8:05 am, mongoose <darrenma1...@gmail.com> wrote:
>>
>>
>>
>> > Hi there,
>>
>> > Currently I've got a recipe application like this:
>>
>> > class RecipeAdmin(admin.ModelAdmin):
>> >         fieldsets = (
>> >                 ('Recipe Details',{
>> >                         'fields': (
>> >                                 ('title', 'slug'),'description',
'difficulty', 'vegetarian',
>> > 'serves', ('prep_time', 'cooking_time'), 'categories','tags'
>> >                                 )
>> >                         }),
>> >                 ('Cooking Instructions', {'fields': ['instructions']}),
>> >                 )
>> >         inlines = [IngredientInline, PhotoInline]
>>
>> > The problem here is that the Ingredients are being listed after the
>> > Cooking Instruction which doesn't really fit. The best would be to
>> > have something like this:
>>
>> > class RecipeAdmin(admin.ModelAdmin):
>> >         fieldsets = (
>> >                 ('Recipe Details',{
>> >                         'fields': (
>> >                                 ('title', 'slug'),'description',
'difficulty', 'vegetarian',
>> > 'serves', ('prep_time', 'cooking_time'), 'categories','tags'
>> >                                 )
>> >                         }),
>>
>> >         inlines = [IngredientInline, PhotoInline]
>>
>> >                 ('Cooking Instructions', {'fields': ['instructions']}),
>> >                 )
>>
>> > Thanks a lot!
>>
>> I'm not sure if there is an admin setting that will allow you to
>> specify this ordering.  Either way, you can always override the admin
>> template for this particular class.
>>
>> Read about it here:
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-ad...
>>
>> Wayne
>
> --
> 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<django-users%2bunsubscr...@googlegroups.com>
.
> For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.
>

-- 
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.

Reply via email to