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

when the filed name is "content" render error #17

Open
mailnull opened this issue Oct 29, 2020 · 1 comment
Open

when the filed name is "content" render error #17

mailnull opened this issue Oct 29, 2020 · 1 comment

Comments

@mailnull
Copy link

django==2.2
in model :
content = somefieldname

in admin
CKEditorWidget render all the page

@mailnull
Copy link
Author

class PuxuForm(forms.ModelForm):
    class Meta:

        model = Puxu
        fields = '__all__'
        widgets = {
            'content': CKEditorWidget(editor_options={'lang': 'zh-cn'})
        }


@admin.register(Puxu)
class PuxuAdmin(admin.ModelAdmin):
    form = PuxuForm
    fieldsets = [
        (None,{'fields':('title','name')}),
        ('正文', {'classes': ('full-width',), 'fields': ('content',)})
    ]

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