diff --git a/README.md b/README.md index 8203489..a5a427a 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,10 @@ Simple app containing a mixin model that integrates modeltranslation ## Release Notes +## v0.1.1 + +- Fixed url_path issue caused by a browser with language different from settings.LANGUAGE_CODE + ## v0.1 - Minor release working but lacks full test coverage. diff --git a/dist/wagtail-modeltranslation-0.1.1.tar.gz b/dist/wagtail-modeltranslation-0.1.1.tar.gz new file mode 100644 index 0000000..ff8ba09 Binary files /dev/null and b/dist/wagtail-modeltranslation-0.1.1.tar.gz differ diff --git a/setup.py b/setup.py index 9e7eb14..fc53f26 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='wagtail-modeltranslation', - version='0.1', + version='0.1.1', packages=['wagtail_modeltranslation'], include_package_data=True, license='BSD License', diff --git a/wagtail_modeltranslation.egg-info/PKG-INFO b/wagtail_modeltranslation.egg-info/PKG-INFO index 37f5068..1467882 100644 --- a/wagtail_modeltranslation.egg-info/PKG-INFO +++ b/wagtail_modeltranslation.egg-info/PKG-INFO @@ -1,12 +1,13 @@ Metadata-Version: 1.1 Name: wagtail-modeltranslation -Version: 0.1 +Version: 0.1.1 Summary: Integration of django-modeltranslation with Wagtail CMS Home-page: https://github.com/infoportugal/wagtail-modeltranslation Author: Rui Martins Author-email: rmartins16@gmail.com License: BSD License Description: # Wagtail modeltranslation + (based on https://github.com/deschler/django-modeltranslation) Simple app containing a mixin model that integrates modeltranslation (https://github.com/deschler/django-modeltranslation) into wagtail panels system. @@ -55,9 +56,13 @@ Description: # Wagtail modeltranslation ## Release Notes + ## v0.1.1 + + - Fixed url_path issue caused by a browser with language different from settings.LANGUAGE_CODE + ## v0.1 - - Minor release working. Lacks of full test coverage. + - Minor release working but lacks full test coverage. - Last version had required fields validation problems, now fixed. ## v0.0.9 diff --git a/wagtail_modeltranslation/models.py b/wagtail_modeltranslation/models.py index 5331540..8adceec 100644 --- a/wagtail_modeltranslation/models.py +++ b/wagtail_modeltranslation/models.py @@ -238,7 +238,8 @@ class TranslationMixin(object): if not tr_slug: tr_slug = getattr(self, 'slug_'+settings.LANGUAGE_CODE) - setattr(self, 'url_path_'+lang[0], parent.url_path + tr_slug + '/') + parent_url_path = getattr(parent, 'url_path_'+lang[0]) + setattr(self, 'url_path_'+lang[0], parent_url_path + tr_slug + '/') else: # a page without a parent is the tree root, # which always has a url_path of '/' diff --git a/wagtail_modeltranslation/models.pyc b/wagtail_modeltranslation/models.pyc index 65a75df..8a01352 100644 Binary files a/wagtail_modeltranslation/models.pyc and b/wagtail_modeltranslation/models.pyc differ diff --git a/wagtail_modeltranslation/tests.py b/wagtail_modeltranslation/tests.py index 7ce503c..57d631c 100644 --- a/wagtail_modeltranslation/tests.py +++ b/wagtail_modeltranslation/tests.py @@ -1,3 +1 @@ -from django.test import TestCase - -# Create your tests here. +# coding: utf-8