P
P
petriichuk2017-03-15 08:36:15
Django
petriichuk, 2017-03-15 08:36:15

Is there a built-in functionality in django to make inline editing of objects of one model (not like in the example, inline from another model)?

The bottom line is that for example there is a list of manufacturers, I would like to make a filling similar to choices in the office. documentation
so that everything can be filled in on one page
40a3e19f1aca42ebbc74c0276e5a3f23.png
Only it is done there as a connection with another model ...
Or does it need to be customized all ??

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
petriichuk, 2017-03-15
@petriichuk

The answer came on stackOverflow:

class ManufacturerAdmin(admin.ModelAdmin):
    list_display=('name', 'country', 'link',)
    list_display_links = ('link',)   
    list_editable=('name', 'country',)

Where "link" is an extra field in the model because Django doesn't allow all fields to be edited inline, without linking to the object itself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question