mirror of
https://github.com/Hopiu/wagtail-modeltranslation.git
synced 2026-05-28 16:38:18 +00:00
Use SlugField and old slug to fill new page slugs
This commit is contained in:
parent
88e5895c5b
commit
07e0e98b47
1 changed files with 1 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ class PatchedCopyForm(CopyForm):
|
|||
for code, name in settings.LANGUAGES:
|
||||
locale_title = "new_slug_{}".format(code)
|
||||
locale_label = "{} [{}]".format(_("New slug"), code)
|
||||
self.fields[locale_title] = forms.CharField(initial=self.page.title, label=locale_label)
|
||||
self.fields[locale_title] = forms.SlugField(initial=self.page.slug, label=locale_label)
|
||||
|
||||
self.fields['new_parent_page'] = forms.ModelChoiceField(
|
||||
initial=self.page.get_parent(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue