Commit graph

225 commits

Author SHA1 Message Date
Dário
b58544400a
Merge pull request #151 from dmarcelino/remove_specific
Remove .specific calls to reduce DB queries
2017-12-27 18:26:40 +00:00
Dario Marcelino
127603cd92 Removes .specific calls from clean() 2017-12-27 18:05:43 +00:00
Dario Marcelino
acf20e2533 Adds (working) test for clean 2017-12-27 18:05:17 +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
d3cec5590d Adds (working) test for model.url and model.get_url_parts() 2017-12-27 17:20:08 +00:00
Dario Marcelino
2af22eda36 Remove call to .specific from _new_route() method 2017-12-27 16:19:59 +00:00
Dario Marcelino
e6488400c2 Adds RoutablePage test 2017-12-27 16:19:51 +00:00
Dario Marcelino
a1c90e9e97 Working test for Page.route() 2017-12-26 15:05:48 +00:00
Dario Marcelino
39acb713dc Refactor PageFactory to be simpler and more explicit 2017-12-26 15:04:51 +00:00
Dario Marcelino
5076788eb4 Please Travis: fix "ImportError: No module named contextlib" 2017-12-23 17:19:02 +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
8250693208 Adds failing test for updating Page slug with untranslated children
Assert set_url_path works correctly when a Page with untranslated
children has its translated slug changed.
2017-12-23 01:02:00 +00:00
Dario Marcelino
2ab997dab5 Adds tag slugurl_trans and drop attempts to patch slugurl
- set_language context manager renamed to use_language
- updated docs about tags
2017-12-22 21:58:25 +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
d22fc4c89c Adds failing test for slugurl tag 2017-12-22 18:42:19 +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
93ffbb09ce Adds failing test for Page.move() within test_set_url_path() 2017-12-22 15:56:16 +00:00
Dario Marcelino
51216693d5 Merge branch 'page_i18n_fields' of
https://github.com/dmarcelino/wagtail-modeltranslation.git into
page_i18n_fields

Conflicts:
	wagtail_modeltranslation/tests/tests.py
2017-12-22 11:47:27 +00:00
Dario Marcelino
e28c00668a Gitignore: add GitEye's/Eclipse's project 2017-12-22 11:40:03 +00:00
Dario Marcelino
d3cb322c33 Adds sub-module makemigrations to override django's 'makemigrations'
command

New 'makemigrations' is a proxy for 'makemigrations_translation', it's
role is only to override django's own command and skip any
wagtailcore_page migrations caused by translation. Adding this to it's
own submodule makes this override optional for the user. The original
Django 'makemigrations' command is available by running
'makemigrations_original'
2017-12-22 11:40:03 +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
1a656b98da Adds failing test showing that saved Page fields are not retrieved
correctly

See
https://github.com/infoportugal/wagtail-modeltranslation/issues/103#issuecomment-352006610
for more details
2017-12-22 11:25:12 +00:00
Dario Marcelino
3a2c3f9b00 Gitignore: add GitEye's/Eclipse's project 2017-12-21 19:05:20 +00:00
Dario Marcelino
fe8bd7e9a4 Adds sub-module makemigrations to override django's 'makemigrations'
command

New 'makemigrations' is a proxy for 'makemigrations_translation', it's
role is only to override django's own command and skip any
wagtailcore_page migrations caused by translation. Adding this to it's
own submodule makes this override optional for the user. The original
Django 'makemigrations' command is available by running
'makemigrations_original'
2017-12-21 19:05:12 +00:00
Dario Marcelino
931ee25931 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-21 18:58:07 +00:00
Diogo Marques
eecab72275
Merge pull request #148 from dmarcelino/child_url_paths
Fixes descendant_url_path on page.save()
2017-12-19 14:56:48 +00:00
Diogo Marques
a60d1888cc
Merge pull request #146 from dmarcelino/url_paths
Patch save() so we ensure set_url_path is called if slug_xx changes (Fixes #145)
2017-12-19 14:53:05 +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
8751517403 Adds failing test for descendant URL path update on .save 2017-12-18 17:21:39 +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
Dario Marcelino
6a483eae19 Adds failing test for set_url_path
If slug for non-current language changes set_url_path is never called
2017-12-16 11:06:57 +00:00
Diogo Marques
ffaa485d83
Merge pull request #144 from dmarcelino/streamfield_fallback
Fix StreamField fallback (addresses #143)
2017-12-14 12:03:26 +00:00
Diogo Marques
bd1dbc6758
Merge branch 'master' into streamfield_fallback 2017-12-14 12:02:52 +00:00
Diogo Marques
53ad48e799
Merge branch 'master' into streamfield_fallback 2017-12-14 12:01:44 +00:00
Diogo Marques
37eec32f7a
Merge pull request #142 from dmarcelino/original_slug
#141: Ensure original slug field is always saved in the same language
2017-12-14 11:53:46 +00:00
Dario Marcelino
1f36b55f0c #143: Fixes StreamField fallback behaviour 2017-12-12 20:21:07 +00:00
Dario Marcelino
1e03faf76e #143: adds failing tests for StreamField fallback 2017-12-12 20:19:17 +00:00
Dario Marcelino
e91101977e #141: documentation for original slug field language changes 2017-12-12 12:26:25 +00:00
Dario Marcelino
7cf94069b6 #141: patch Slug Field pre_save() to ensure slug value consistency 2017-12-12 12:26:02 +00:00
Dario Marcelino
271bbe513f #141 Failing tests for original slug field issue 2017-12-12 12:22:25 +00:00
Diogo Marques
dca220cb0c
Merge pull request #135 from WnP/i18n-slugs
[fix] i18n slugs required specific page in order to retrieve good url
2017-11-30 16:34:52 +00:00
Diogo Marques
da76ec44a2
Merge pull request #137 from dmarcelino/patch-1
#126, Docs: fix translation.py example
2017-11-28 09:59:12 +00:00
Dário
c114d0d326
#126, Docs: fix translation.py example
Update the imports to reflect latest changes
2017-11-27 19:06:54 +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
281e2f7002 Merge pull request #115 from v1kku/master
rename handle_noargs to handle in management commands
2017-05-09 12:45:29 +01: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
500d9e7932 Fixed docs 2017-05-08 17:33:52 +01:00
Alexandre Silva
2b9fcc4fe2 Updated version in setup.py 2017-05-08 16:54:06 +01:00
Alexandre Silva
c7f9369155 Updated docs for v0.6.0rc2 2017-05-08 16:52:52 +01:00