0

enter image description here

Is there a way to put the delete button on the left side? i try to use ordering but it doesnt work because delete is not part of the model

here is my admin.py

class CategoryInline(admin.TabularInline):
    model = Category
    extra = 0


class SurveyAdmin(admin.ModelAdmin):
    list_display = ("name", "is_published")
    inlines = [CategoryInline, QuestionInline]
Duck Yeah
  • 69
  • 1
  • 6

1 Answers1

0

The "Delete?" section is hard-coded to be after the fields in this admin template.

You'll have override this admin template in order to change it. This section in the docs explain how to override an admin template.

Essentially, you'll need to copy this template and save it under <YOUR-APP-DIR>/templates/admin/edit_inline/tabular.html. And then you can edit it to move the "Delete?" column to the front.

D Malan
  • 10,272
  • 3
  • 25
  • 50