Commit graph

59 commits

Author SHA1 Message Date
Eric Sherman
a92d287a6e nested if 2019-10-25 13:17:44 -05:00
Eric Sherman
187e524ed2 import verision constant 2019-10-25 13:14:29 -05:00
Eric Sherman
e742a93f4c different bindto model function depending on wagtail version 2019-10-25 13:06:15 -05:00
Diogo Marques
f52993d73c
Merge pull request #239 from lucasmoeskops/fix-edit-handler-iterator
Fix invalid iterator
2019-06-06 16:29:31 +01:00
Miguel Silva
bbe19792c9 Allows patching admin interface for all models registered for translation 2019-06-06 15:59:25 +01:00
Miguel Silva
640d5202c9 Linter fix 2019-06-06 15:58:12 +01:00
Diogo Marques
5ef04f30f2 Fixes #242
Set a default url_path for old instances
2019-05-09 11:41:34 +01:00
Lucas Moeskops
b883f051f3 Fix invalid iterator 2019-04-01 15:46:37 +02:00
Diogo Marques
1cb2a41a08 Hotfix: missing import 2019-02-01 14:28:41 +00:00
Diogo Marques
8b8f64a7cc
Merge branch 'master' into django2 2019-02-01 14:22:48 +00:00
Diogo Marques
e7adf51d2a
Merge pull request #214 from infoportugal/210_hide_old_fields
Hide old fields for snippets without panels defenition
2018-08-21 17:18:49 +01:00
DiogoMarques
531a7494c2 Adds setting to translate slugs (default True) 2018-06-21 12:10:17 +01:00
DiogoMarques
7929589e7a Hotfix: import for wagtail >= 2.0 2018-06-14 11:27:06 +01:00
DiogoMarques
49246457cb Hide old fields for snippets without panels defenition 2018-06-14 11:20:12 +01:00
Dario Marcelino
11cbedfe13 #191, drop support for Wagtail < 1.8
And inherently Django < 1.8
2018-04-24 16:52:15 +01:00
Dario Marcelino
7d69a7135d #191, Django 2 compatibility 2018-04-24 16:42:07 +01:00
Dario Marcelino
a92cf200a3 #195: cache each language's site root paths individually
instead of evicting the cache when language changes.
Patch `Page._get_site_root_paths()` and `Page.get_url_parts()` on Wagtail<1.11
Update `test_root_page_slug` to cover more scenarios
2018-04-03 09:04:02 +01:00
Dario Marcelino
2621e6e407 #195: replace _new_get_site_root_paths with decorator
While not as robust, this allows greater flexibility as we can re-use the decorator to decorate Model.get_url_parts() on wagtail<1.11
2018-04-02 19:24:54 +01:00
Dario Marcelino
c63eee4506 #195: if cached site_root_paths has different language clear cache and refetch them 2018-04-02 18:32:36 +01:00
Stuart Axon
7cc4eece20 Change imports for wagtail2 2018-03-14 11:38:10 +00:00
Dario Marcelino
080bd89b6f #170: make localized StreamFields default to optional 2018-02-14 18:08:22 +00:00
Dario Marcelino
2205fd719f Remove _new_relative_url and _new_url methods
These had been removed before but were reintroduced during experimental
branch merge
2018-01-05 19:14:24 +00:00
DiogoMarques
8c246f7f89 Merge branch 'experimental' 2018-01-05 18:36:44 +00:00
Dario Marcelino
b62be23616 Patches _update_descendant_url_paths to add .rewrite(False) to queryset
- _localized_update_descendant_url_paths: replaces raw SQL query for
Django queryset
- Refactors some *_descendant_url_paths methods for better clarity
2018-01-05 16:35:58 +00:00
Dario Marcelino
3b463f7ee7 Remove slug .pre_save() patch since it's no longer relevant
Update docs accordingly
2018-01-03 19:01:12 +00:00
Diogo Marques
7f028ffac8
Merge pull request #125 from WnP/fix-RemovedInWagtail113Warning
relative_url should accept a 'request' keyword argument.
2018-01-03 12:58:32 +00:00
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
Steeve Chailloux
de3797cc8f relative_url should accept a 'request' keyword argument. 2017-08-24 18:45:10 +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