{"id":23102821,"url":"https://github.com/dataxujing/django2-ueditor","last_synced_at":"2026-02-27T10:32:56.688Z","repository":{"id":112305143,"uuid":"169423254","full_name":"DataXujing/django2-ueditor","owner":"DataXujing","description":":fire::fire::fire:Django2中集成xadmin和ueditor","archived":false,"fork":false,"pushed_at":"2022-11-21T02:55:34.000Z","size":22164,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-15T09:40:36.616Z","etag":null,"topics":["django","python3","ueditor","xadmin"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DataXujing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-06T14:58:27.000Z","updated_at":"2022-11-25T14:55:31.000Z","dependencies_parsed_at":"2023-05-12T14:30:34.638Z","dependency_job_id":null,"html_url":"https://github.com/DataXujing/django2-ueditor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DataXujing/django2-ueditor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataXujing%2Fdjango2-ueditor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataXujing%2Fdjango2-ueditor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataXujing%2Fdjango2-ueditor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataXujing%2Fdjango2-ueditor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DataXujing","download_url":"https://codeload.github.com/DataXujing/django2-ueditor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataXujing%2Fdjango2-ueditor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29891477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T09:48:51.284Z","status":"ssl_error","status_checked_at":"2026-02-27T09:48:43.992Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","python3","ueditor","xadmin"],"created_at":"2024-12-17T00:00:31.670Z","updated_at":"2026-02-27T10:32:56.668Z","avatar_url":"https://github.com/DataXujing.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django添加富文本编辑器\n\n**徐静 算法工程师**\n\n## 0.环境\n\n```shell\npython3.6.X\nwin10\n\n\ndjango\u003e=2\ndjango-crispy-forms\u003e=1.6.0\ndjango-import-export\u003e=0.5.1\ndjango-reversion\u003e=2.0.0\ndjango-formtools==2.1\nfuture==0.15.2\nhttplib2==0.9.2\nsix==1.10.0\n\n```\n\n本教程假设您多Django熟悉！\n\n需要的资源\n\n+ [xadmin](https://github.com/sshwsfc/xadmin/tree/django2)\n```shell\ngit clone https://github.com/sshwsfc/xadmin/tree/django2\n```\n+ [DjangoUeditor](https://github.com/twz915/DjangoUeditor3/)\n```shell\ngit clone https://github.com/twz915/DjangoUeditor3.git\n```\n\n## 1.xadmin\n\n1.解压并拷贝到`extra_apps`\n\n2.修改settings文件:\n![](img/p1.png)\n\n![](img/p2.png)\n\n![](img/p3.png)\n\n![](img/p4.png)\n\n![](img/p5.png)\n\n3.在urls添加xadmin:\n![](img/p6.png)\n\n4.修改xadmin\n\n```python\n# adminx.py\n\nclass GlobalSettings:\n    \"\"\"\n    后台修改\n    \"\"\"\n    site_title = '修改后的名称'\n    site_footer = '修改后的底部'\n    menu_style = 'accordion'  # 开启分组折叠\n\nxadmin.site.register(views.CommAdminView, GlobalSettings)\n```\n\n或者\n\n`xadmin/views/base.py`\n\n![](img/p7.png)\n\n\n5.添加主题\n\n`blog_list/adminx.py`\n\n![](img/p8.png)\n\n\n## 2.DjangoUeditor\n\n1.加压到extra_apps\n\n2.修改urls.py 和 models.py\n\n![](img/p9.png)\n\n3.添加adminx.py和修改admin.py\n![](img/p10.png)\n\n![](img/p11.png)\n\n4.修改apps.py\n\n![](img/p12.png)\n\n![](img/p13.png)\n\n\n最后 `python manage.py runserver ip:port`后会报如下错误\n\n![](img/p14.png)\n\n找到虚拟环境中包的位置，然后注释调改行代码就可以解决！\n\n## 在前端显示富文本及其内容\n\n**1.在前端展示富文本编辑器**\n\n![](img/p15.png)\n\n**2.展示富文本的内容**\n\n```html\n\u003c!-- 法1 --\u003e\n\u003c!-- {{ article_content | safe }} --\u003e\n\n\u003c!-- 法2 --\u003e\n\n\u003c!-- {% autoescape off %}\n{{blog.content }}\n{% endautoescape %} --\u003e\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdataxujing%2Fdjango2-ueditor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdataxujing%2Fdjango2-ueditor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdataxujing%2Fdjango2-ueditor/lists"}