重定向最大长度太短

时间:2018-08-24 13:51:49

标签: django wagtail

我们迁移到Wagtail涉及为很长的网址创建重定向,例如阿拉伯文网址。 seem重定向系统似乎不支持这些功能。有任何解决方法吗?

迁移脚本错误:

django.db.utils.DataError: value too long for type character varying(255)

数据库控制台错误:

db_1     | 2018-08-24 13:19:06.000 UTC [134] ERROR:  value too long for type character varying(255)
db_1     | 2018-08-24 13:19:06.000 UTC [134] STATEMENT:  INSERT INTO "wagtailredirects_redirect" ("old_path", "site_id", "is_permanent", "redirect_page_id", "redirect_link") VALUES ('https://www.opendemocracy.net/5050/atiaf-zaid-alwazir/%D9%88%D9%85%D8%A7-%D9%8A%D8%B2%D8%A7%D9%84-%D8%A7%D9%84%D8%B7%D8%B1%D9%8A%D9%82-%D8%B7%D9%88%D9%8A%D9%84%D8%A7-%E2%80%93-%D8%A8%D9%82%D9%84%D9%85-%D8%A3%D8%B7%D9%8A%D8%A7%D9%81-%D8%B2%D9%8A%D8%AF-%D8%A7%D9%84%D9%88%D8%B2%D9%8A%D8%B1', 1, true, 9528, '') RETURNING "wagtailredirects_redirect"."id"

(注意:即使从url中删除域名,仍然会给我们留下utf-8字符串257,这太长了)

0 个答案:

没有答案