Skip to content

Commit

Permalink
Merge pull request #92 from molgen/fix-autogenerated-slugs
Browse files Browse the repository at this point in the history
Fix autogenerated slugs
  • Loading branch information
donald authored Aug 23, 2020
2 parents 4018fc7 + 507a091 commit a2052a4
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# GENERAL
# ------------------------------------------------------------------------------
TIME_ZONE = 'Europe/Berlin'
LANGUAGE_CODE = 'en-us'
LANGUAGE_CODE = 'en'
SITE_ID = 1
USE_I18N = True
USE_L10N = True
Expand Down
29 changes: 29 additions & 0 deletions patches/Fix-autogenerated-slugs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From 35449e448200598d5b002d8e55ab8ece9ede0217 Mon Sep 17 00:00:00 2001
From: Donald Buczek <buczek@molgen.mpg.de>
Date: Sun, 23 Aug 2020 21:17:21 +0200
Subject: [PATCH] Fix autogenerated slugs

Fix bug in wagtail_modeltranslation which disables the autogeneration of
slugs.

See https://github.com/infoportugal/wagtail-modeltranslation/issues/293
---
.../site-packages/wagtail_modeltranslation/wagtail_hooks.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/python3.7/site-packages/wagtail_modeltranslation/wagtail_hooks.py b/lib/python3.7/site-packages/wagtail_modeltranslation/wagtail_hooks.py
index 1bbff88..3b3d61f 100644
--- a/lib/python3.7/site-packages/wagtail_modeltranslation/wagtail_hooks.py
+++ b/lib/python3.7/site-packages/wagtail_modeltranslation/wagtail_hooks.py
@@ -54,7 +54,7 @@ def translated_slugs():
languages: [{languages}],
defaultLanguage: '{language_code}',
viewEditString: '{view_edit_string}',
- translate_slugs: '{translate_slugs}',
+ translate_slugs: {translate_slugs},
}};
</script>
""".format(
--
2.26.2

0 comments on commit a2052a4

Please sign in to comment.