Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SortableTabularInline conflict #4

Open
paulshannon opened this issue Mar 11, 2014 · 0 comments
Open

SortableTabularInline conflict #4

paulshannon opened this issue Mar 11, 2014 · 0 comments

Comments

@paulshannon
Copy link

When you use a RedactorWidget in a SortableTabularInline and the SortableTabularInline items get re-ordered, the item that gets reordered no longer displays the content of the RedactorWidget (but appears to allow you to change it).

class QuestionForm(ModelForm):
    model = Question

    class Meta:
        widgets = {
            'html': RedactorWidget(editor_options={'lang': 'en'})
        }

class QuestionInline(SortableTabularInline):
    model = Question
    form = QuestionForm
    sortable = 'order'

class TestForm(ModelForm):
    model = Test

class TestAdmin(ModelAdmin):
    form = TestForm
    inlines = (QuestionInline,)
admin.site.register(Test, TestAdmin)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant