Вот пример того, как это можно сделать в javascript:
model.py
class PlaceName(models.Model):
name = models.CharField(max_length=500, db_index=True)
short_name = models.CharField(max_length=100, null=True, blank=True)
type = models.ForeignKey(PlaceType, to_field='code', null=False, blank=False, on_delete=models.PROTECT)
area = models.CharField(max_length=100, db_index=True)
lat = models.DecimalField(max_digits=9, decimal_places=6)
lon = models.DecimalField(max_digits=9, decimal_places=6)
hasl = models.IntegerField(help_text='Height above sea level')
importance = models.IntegerField(db_index=True)
place_id = models.CharField(max_length=100, unique=True)
admin.py
class PlaceNameAdmin(admin.ModelAdmin):
list_display = ('name', 'importance', 'type', 'area', 'hasl', )
list_filter = ('area', 'type', )
readonly_fields = ('name', 'short_name', 'type', 'area', 'lat', 'lon', 'hasl', 'place_id')
search_fields = ('name', 'importance', 'hasl')
list_editable = ('importance',)
class Media:
js = ('multi_line_list_edit.js',)
static / multi_line_list_edit.js
(function($) {
var value_changed = function(jQel) {
if (jQel.parent().siblings('.action-checkbox').find(':checkbox:checked').length) {
var value = jQel.val();
$('#result_list tr').each(function () {
if ($(this).find(':checkbox:checked').length)
$(this).find('td.field-importance input').val(value);
});
}
};
$(document).ready(function () {
$('#result_list td.field-importance input').change(function () {
value_changed($(this));
});
$('#result_list td.field-importance input').keyup(function () {
value_changed($(this));
});
});
})(django.jQuery);
Вам все равно придется нажать кнопку Сохранить, но добавив еще несколько javascript, можно будет сохранить изменения, просто нажав клавишу Enter.