https://code.ziqiangxuetang.c.
django admin integrated DjangoUeditor editor based on teacher Tu Weizhong"s tutorial did not report an error, but it didn"t work
from django.contrib import admin
from .models import Column, Article
from DjangoUeditor.models import UEditorField
class ColumnAdmin(admin.ModelAdmin):
list_display = ("name", "slug", "intro",)
class ArticleAdmin(admin.ModelAdmin):
list_display = ("title", "slug", "author", "pub_date", "update_time")
fields = (("title", "slug"), "column", "author", "content", "published")
content = UEditorField("", height=300, width=1000,
default=u"", blank=True, imagePath="uploads/images/",
toolbars="besttome", filePath="uploads/files/")
from django.contrib import admin
from .models import Column, Article
from DjangoUeditor.models import UEditorField
class ColumnAdmin(admin.ModelAdmin):
list_display = ("name", "slug", "intro",)
class ArticleAdmin(admin.ModelAdmin):
list_display = ("title", "slug", "author", "pub_date", "update_time")
fields = (("title", "slug"), "column", "author", "content", "published")
content = 123
admin.site.register(Column, ColumnAdmin)
admin.site.register(Article, ArticleAdmin)
there is no response even if it is changed to this way
I add content = UEditorField ("content", height=300, width=1000, default=u"", blank=True, imagePath= "uploads/images/", toolbars="besttome", filePath="uploads/files/") to the model file, and the rich text editor works, but it doesn"t work in admin