Commit graph

32 commits

Author SHA1 Message Date
Dario Marcelino
a90d0faf29 update_untranslated_descendants_url_paths: reduce number of DB queries
Instead of performing a query for each changed language, aggregate all
conditions into a single one using Q and run a single query per changed
page.
2018-01-02 18:29:53 +00:00
Dario Marcelino
f4d89944f1 update_untranslated_descendants_url_paths: add update_fields to .save()
Since we only need to update the 'localized_url_path' and nothing else.
Additional changes to `LocalizedSaveDescriptor` were made to ensure
descendants were updated when they needed to.
2018-01-02 16:12:38 +00:00
Dario Marcelino
127603cd92 Removes .specific calls from clean() 2017-12-27 18:05:43 +00:00
Dario Marcelino
17b2fe375c Remove model.url and model.get_url_parts() patches
since there no need to use .specific anymore
2017-12-27 17:20:48 +00:00
Dario Marcelino
2af22eda36 Remove call to .specific from _new_route() method 2017-12-27 16:19:59 +00:00
Dario Marcelino
efd47b87e1 Fixes update_descendant_url_paths
for when children don't have their translated slugs set up.
2017-12-23 01:04:42 +00:00
Dario Marcelino
4bcd6086e0 Patch slugurl to accept original language slug
no matter what is the user's current language
2017-12-22 18:46:57 +00:00
Dario Marcelino
252f142493 Adds new Page.move() descriptor to fix children URL paths 2017-12-22 15:57:33 +00:00
Dario Marcelino
333c392dc8 Move Page translation fields to Page table (breaking changes!)
- Bumps version to 0.8.0-alpha
- Introduces 'makemigrations_translation' command to avoid generating
wagtailcore_page migrations
- Adds 'sync_page_translation_fields' which mimicks
'sync_translation_fields' but restricts it to Page model
- This change introduces breaking changes and has no migration script to
move from 0.6 to 0.8
- Updates tests
2017-12-22 11:40:03 +00:00
Dario Marcelino
d10d56a202 Fixes descendant_url_path on .save
Uses similar logic as Wagtail's .save() but adjusted for different
languages
2017-12-18 17:22:48 +00:00
Dario Marcelino
fc0e803dc5 Patch save() so we ensure set_url_path is called if slug_xx changes
Wagtail can only detect changes in slug for current language so we need
to check the others
2017-12-16 11:46:39 +00:00
Diogo Marques
53ad48e799
Merge branch 'master' into streamfield_fallback 2017-12-14 12:01:44 +00:00
Dario Marcelino
1f36b55f0c #143: Fixes StreamField fallback behaviour 2017-12-12 20:21:07 +00:00
Dario Marcelino
7cf94069b6 #141: patch Slug Field pre_save() to ensure slug value consistency 2017-12-12 12:26:02 +00:00
Steeve Chailloux
dd473f1497 [fix] i18n slugs required specific page in order to retrieve good url path 2017-10-27 15:17:38 +02:00
Alexandre Silva
791a9c003a Changed validation on _new_route to check if the object is an instance of RoutablePageMixin 2017-05-09 12:44:12 +01:00
Alexandre Silva
5361ae777f Merge pull request #119 from dwasyl/routing-for-routablepages
Added routing for RoutablePages
2017-05-09 12:42:24 +01:00
Alexandre Silva
024a407cf3 Added RichTextFieldPanel to the default simple panel classes 2017-05-08 15:08:26 +01:00
David
2950a8f75b Added routing for RoutablePages 2017-04-27 23:26:00 -06:00
David
ce969d8581 Remove extraneous children 2017-04-27 23:21:16 -06:00
Alexandre Silva
f2a9b647d9 Added setting to define custom simple and composed panels to be patched. 2017-03-10 16:43:19 +00:00
Alexandre Silva
f331ac3643 Fixed related model field for inline panel patching in Django 1.8. 2017-03-06 14:56:24 +00:00
Alexandre Silva
68a8dcd862 Compatibility with Python 3. 2017-03-06 14:16:20 +00:00
Alexandre Silva
f3396fbb5e Fixed duplicate slug validation. 2017-03-06 09:49:48 +00:00
Alexandre Silva
c216ffdc7b Fixed patched set_url_method to update the url_path for the page children. 2017-03-03 16:33:26 +00:00
Alexandre Silva
32d902b049 Code cleanup. 2017-03-03 11:10:27 +00:00
Alexandre Silva
b28e8d4781 Patching of panels when the model has a custom edit_handler. 2017-03-03 10:08:43 +00:00
Alexandre Silva
498e0d33f6 Simplified process to make a translated field required.
Removed unnecessary logic from __init__ in WagtailTranslationOptions.
2017-03-01 11:51:21 +00:00
Alexandre Silva
564469266b Fixed the search_fields patching for the new implementation.
Renamed PageTranslationOptions to WagtailTranslationOptions.
2017-02-23 15:55:26 +00:00
Alexandre Silva
f43d8a4bad Refactoring of the panel patching functions. 2017-02-23 11:49:34 +00:00
Alexandre Silva
a65b559fe2 Removed fallback to older wagtail versions. 2017-02-21 15:16:10 +00:00
Alexandre Silva
08382f82b6 Refactored all existing code to use modeltranslation as a dependency. 2017-02-21 12:53:40 +00:00