django 1.5 admin inline extra -


i have models large number of inlines. since not needed every object declared inline model extra = 0 small add + appeared on inline.

however, seems no longer work in django 1.5. if extra = 0 set, inline no longer editable.

is there way 1.4 behavior 1.5?

example code:

class modelinline(admin.stackedinline):     model = mymodel     = 0  class othermodeladmin(admin.modeladmin)     inlines = [modelinline]  admin.site.register(othermodel, othermodeladmin) 

edit (some screens):

django 1.4: django 1.4 extra=0

django 1.5: enter image description here

(hinzufügen == add)

this happen before.

the new javascript made impossible because "add another" button  controlled max_num, , ignored value of 0. javascript ignored value of 0 because max_num has default value of 0,  , code using had taken equating max_num = 0 being "off".  can't have maximum of 0. it's not possible. 

there patch create gabrial hurley restores desired behaviour without breaking else. 3years ago , don't know if still working django 1.5. try :)

https://code.djangoproject.com/attachment/ticket/13023/13023_inlines_patch.diff

here ticket same bug (3 years ago):

https://code.djangoproject.com/ticket/13023


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -