Search code examples
djangockeditordjango-ckeditor

django ckeditor takes whole site with saving buttons


I'm trying to set django-suit-ckeditor for TextField in django admin but it takes whole content-title div with 'saving' buttons instead of a single field. It works for every other field. Just like here http://django-suit.readthedocs.org/en/latest/wysiwyg.html Any one knows the reason?

Here's screenshot: https://i.sstatic.net/HW7LV.png and here's my code:

class PostForm(ModelForm):
    class Meta:
        widgets = {
            'content': CKEditorWidget(editor_options={'startupFocus': True})
        }

class PostAdmin(admin.ModelAdmin):
    form = PostForm
    fieldsets = [
        ('Content', {'fields': ('content',)})
    ]


admin.site.register(Post, PostAdmin)

I would be grateful for any help.

EDIT: I've solved problem by using django-ckeditor not django-suit-ckeditor.


Solution

  • If anyone is still interested - there are some name clashing causes this. Just rename your field from content to anything else.