python - Django nested inlines not working? -


i've installed django-nested-inline have problems. here's code:

from django.contrib import admin nested_inline.admin import nestedstackedinline, nestedmodeladmin .models import positive, negative, option, question  class positiveinline(nestedstackedinline):     model = positive  class negativeinline(nestedstackedinline):     model = negative  class optioninline(nestedstackedinline):     model = option     inlines = [positiveinline, negativeinline,]  class questionadmin(nestedmodeladmin):     fieldsets = [         (none,               {'fields': ['question_title']}),         ('date information', {'fields': ['pub_date'], 'classes': ['collapse']}),     ]     inlines = [optioninline,]  admin.site.register(question, questionadmin) 

when try add new question, have error:

attributeerror @ /admin/question/question/add/  'optioninline' object has no attribute 'queryset' 

am doing wrong?

posted comment, since worked out i'll post here future reference. seems result of bug, referenced , fix has been applied here: https://github.com/s-block/django-nested-inline/issues/31


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -