【问题标题】:Customizing admin ui-widget in Wagtail在 Wagtail 中自定义管理 ui-widget
【发布时间】:2018-12-06 20:56:57
【问题描述】:

我将django-taggit 0.23.0wagtail 2.0.2 用于名为puput 1.0.2 的博客应用程序。

Puput github repo

我的首选语言是 Wagtail 管理仪表板中的波斯语(波斯语),我的一个语言字母在键盘的“逗号”键上。
因此,每次我想使用该字母时,都会提交标签,我无法添加标签适当地。如何在管理员仪表板中添加/编辑标签时自定义 ui-widget?
我还尝试在设置中使用这些命令行并覆盖其功能,但没有解决我的问题:

TAGGIT_TAGS_FROM_STRING = 'utils.comma_joiner'
TAGGIT_TAGS_FROM_STRING = 'utils.comma_splitter'

任何解决方案将不胜感激!!!

【问题讨论】:

    标签: python django wagtail django-taggit weblog


    【解决方案1】:

    您应该升级到 Wagtail 2.3。这包括对西里尔文键盘上相同问题的修复(其中字母 б 对应于逗号键),并且有望解决波斯语的问题。

    Original bugfix

    Wagtail 2.3 release notes

    【讨论】:

    • 感谢您的回答,但实际上我在我的项目中使用puput 1.0.2 作为 django 应用程序,当我更新 Wagtail 时,它给出了这个错误:puput 1.0.2 has requirement wagtail<2.1,>=1.0, but you'll have wagtail 2.3 which is incompatible. 我该怎么办?
    • 而且,当我想进行迁移时,出现以下错误:The included URLconf '<module 'wagtail.search.urls' from wagtail/search/urls/__init__.py'>' does not appear to have any patterns in it. If you see valid patterns in the file then the issue is probably caused by a circular import.
    • 关于 puput 依赖问题,您必须等待他们发​​布与 Wagtail 2.3 一起使用的更新版本。有一个 PR 正在等待github.com/APSL/puput/pull/181
    • 至于search.urls 问题,我想它是在您升级到 Wagtail 2.3 后发生的,该版本删除了前端搜索视图 github.com/wagtail/wagtail/commit/…,因此您必须从中删除 from wagtail.search import urls as wagtailsearch_urlsurl(r'^search/', include(wagtailsearch_urls)),你的设置。
    • 是的,您实际上是对的,我意识到昨晚我将Puput urls 扩展到我的代码库中并且它运行良好。我还在我的项目中创建了另一个应用程序并将这些 url 放入其中,但是当我将代码推送到生产服务器 (ubuntu 16.04) 时,出现内部服务器错误。我使用nginx & uwsgi。 @LoïcTeixeira
    【解决方案2】:

    升级到Wagtail 2.3解决了这个问题,但是,puputWagtail的兼容性出现了另一个问题,这是因为在最新版本的puput 2.0.1中,前端搜索视图被删除了,但是,你可以解决通过扩展/更改 puput url 和删除搜索视图 url 来解决这个问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-07-02
      • 2021-10-04
      • 1970-01-01
      • 2018-05-10
      • 1970-01-01
      • 2021-01-24
      • 1970-01-01
      相关资源
      最近更新 更多