From 85c65e0767a1f3ce5260fde7eceefb1c70eea3b3 Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 14 Dec 2015 15:46:55 +0300 Subject: [PATCH 01/69] - BLOG_ADMIN_POST_FIELDSET_FILTER settings is added, doc is updated - functionality and test for filedssets filtering --- README.rst | 2 ++ djangocms_blog/admin.py | 4 ++++ djangocms_blog/settings.py | 2 ++ tests/test_models.py | 16 ++++++++++++++++ 4 files changed, 24 insertions(+) diff --git a/README.rst b/README.rst index e25f58d..77af1c8 100644 --- a/README.rst +++ b/README.rst @@ -351,6 +351,8 @@ Global Settings used; (default: ``True``) * BLOG_DEFAULT_PUBLISHED: If posts are marked as published by default; (default: ``False``) +* BLOG_ADMIN_POST_FIELDSET_FILTER: Callable function to change(add or filter) + fields to fieldsets for admin post edit form; (default: ``False``) * BLOG_AVAILABLE_PERMALINK_STYLES: Choices of permalinks styles; * BLOG_PERMALINK_URLS: URLConf corresponding to BLOG_AVAILABLE_PERMALINK_STYLES; diff --git a/djangocms_blog/admin.py b/djangocms_blog/admin.py index f90ea87..ecbb2a3 100755 --- a/djangocms_blog/admin.py +++ b/djangocms_blog/admin.py @@ -10,6 +10,7 @@ from django.conf import settings from django.contrib import admin from django.contrib.auth import get_user_model from django.utils.translation import ugettext_lazy as _ +from django.utils.six import callable from parler.admin import TranslatableAdmin from .cms_appconfig import BlogConfig @@ -108,6 +109,9 @@ class PostAdmin(PlaceholderAdminMixin, FrontendEditableAdminMixin, fsets[1][1]['fields'][0].append('sites') if request.user.is_superuser: fsets[1][1]['fields'][0].append('author') + filter_function = get_setting('ADMIN_POST_FIELDSET_FILTER') + if callable(filter_function): + fsets = filter_function(fsets, request, obj=obj) return fsets def get_prepopulated_fields(self, request, obj=None): diff --git a/djangocms_blog/settings.py b/djangocms_blog/settings.py index f3b2878..1798a26 100644 --- a/djangocms_blog/settings.py +++ b/djangocms_blog/settings.py @@ -80,6 +80,8 @@ def get_setting(name): 'BLOG_MULTISITE': getattr(settings, 'BLOG_MULTISITE', True), 'BLOG_AUTHOR_DEFAULT': getattr(settings, 'BLOG_AUTHOR_DEFAULT', True), 'BLOG_DEFAULT_PUBLISHED': getattr(settings, 'BLOG_DEFAULT_PUBLISHED', False), + 'BLOG_ADMIN_POST_FIELDSET_FILTER': getattr( + settings, 'BLOG_ADMIN_POST_FIELDSET_FILTER', False), 'BLOG_AVAILABLE_PERMALINK_STYLES': getattr( settings, 'BLOG_AVAILABLE_PERMALINK_STYLES', PERMALINKS ), diff --git a/tests/test_models.py b/tests/test_models.py index 77cd4f8..fcce681 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -191,6 +191,22 @@ class AdminTest(BaseTest): self.assertEqual(Post.objects.count(), 3) self.assertEqual(Post.objects.get(translations__slug='third-post').author.username, 'staff') + def test_admin_fieldsets_filter(self): + post_admin = admin.site._registry[Post] + request = self.get_page_request('/', self.user_normal, r'/en/blog/?app_config=%s' % self.app_config_1.pk) + + fsets = post_admin.get_fieldsets(request) + self.assertFalse('author' in fsets[1][1]['fields'][0]) + + def filter_function(fs, request, obj=None): + if request.user == self.user_normal: + fs[1][1]['fields'][0].append('author') + return fs + + with self.settings(BLOG_ADMIN_POST_FIELDSET_FILTER=filter_function): + fsets = post_admin.get_fieldsets(request) + self.assertTrue('author' in fsets[1][1]['fields'][0]) + def test_admin_post_text(self): pages = self.get_pages() post = self._get_post(self._post_data[0]['en']) From a315e1c3f8a6430b815f753b2bd6cc5856c833ad Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 14 Dec 2015 15:53:21 +0300 Subject: [PATCH 02/69] fix for isort --- djangocms_blog/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/djangocms_blog/admin.py b/djangocms_blog/admin.py index ecbb2a3..3036c51 100755 --- a/djangocms_blog/admin.py +++ b/djangocms_blog/admin.py @@ -9,8 +9,8 @@ from django import forms from django.conf import settings from django.contrib import admin from django.contrib.auth import get_user_model -from django.utils.translation import ugettext_lazy as _ from django.utils.six import callable +from django.utils.translation import ugettext_lazy as _ from parler.admin import TranslatableAdmin from .cms_appconfig import BlogConfig From 2aa52b16bb4807e198c8f59a343aba2c453e37d5 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 15 Dec 2015 12:19:04 +0300 Subject: [PATCH 03/69] example addon in README.rst for BLOG_ADMIN_POST_FIELDSET_FILTER usage --- README.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 77af1c8..f805e8a 100644 --- a/README.rst +++ b/README.rst @@ -352,7 +352,11 @@ Global Settings * BLOG_DEFAULT_PUBLISHED: If posts are marked as published by default; (default: ``False``) * BLOG_ADMIN_POST_FIELDSET_FILTER: Callable function to change(add or filter) - fields to fieldsets for admin post edit form; (default: ``False``) + fields to fieldsets for admin post edit form; (default: ``False``). Function simple example: + def fieldset_filter_function(fsets, request, obj=None): + if request.user.groups.filter(name='Editor').exists(): + fsets[1][1]['fields'][0].append('author') # adding 'author' field if user is Editor + return fsets * BLOG_AVAILABLE_PERMALINK_STYLES: Choices of permalinks styles; * BLOG_PERMALINK_URLS: URLConf corresponding to BLOG_AVAILABLE_PERMALINK_STYLES; From f364cd3c12c59e8d74382c1657948d711b686918 Mon Sep 17 00:00:00 2001 From: cluster-master Date: Tue, 15 Dec 2015 13:13:32 +0300 Subject: [PATCH 04/69] Update README.rst --- README.rst | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index f805e8a..2ac21e1 100644 --- a/README.rst +++ b/README.rst @@ -352,11 +352,15 @@ Global Settings * BLOG_DEFAULT_PUBLISHED: If posts are marked as published by default; (default: ``False``) * BLOG_ADMIN_POST_FIELDSET_FILTER: Callable function to change(add or filter) - fields to fieldsets for admin post edit form; (default: ``False``). Function simple example: - def fieldset_filter_function(fsets, request, obj=None): - if request.user.groups.filter(name='Editor').exists(): - fsets[1][1]['fields'][0].append('author') # adding 'author' field if user is Editor - return fsets + fields to fieldsets for admin post edit form; (default: ``False``). Function simple example:: + + + def fieldset_filter_function(fsets, request, obj=None): + if request.user.groups.filter(name='Editor').exists(): + fsets[1][1]['fields'][0].append('author') # adding 'author' field if user is Editor + return fsets + + * BLOG_AVAILABLE_PERMALINK_STYLES: Choices of permalinks styles; * BLOG_PERMALINK_URLS: URLConf corresponding to BLOG_AVAILABLE_PERMALINK_STYLES; From 4d7ae8275f75d52aac77410027cd00774dc8c2ee Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sun, 20 Dec 2015 17:09:16 +0100 Subject: [PATCH 05/69] Fix error when no config is found --- djangocms_blog/menu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/djangocms_blog/menu.py b/djangocms_blog/menu.py index 6b4e883..036811e 100644 --- a/djangocms_blog/menu.py +++ b/djangocms_blog/menu.py @@ -25,9 +25,9 @@ class BlogCategoryMenu(CMSAttachMenu): config = False if hasattr(self, 'instance') and self.instance: config = BlogConfig.objects.get(namespace=self.instance.application_namespace) - if config.menu_structure in (MENU_TYPE_COMPLETE, MENU_TYPE_CATEGORIES): + if config and config.menu_structure in (MENU_TYPE_COMPLETE, MENU_TYPE_CATEGORIES): categories_menu = True - if config.menu_structure in (MENU_TYPE_COMPLETE, MENU_TYPE_POSTS): + if config and config.menu_structure in (MENU_TYPE_COMPLETE, MENU_TYPE_POSTS): posts_menu = True if categories_menu: From 549d13a84d1e4310dfc81b989af31376f50d0b89 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Fri, 18 Dec 2015 11:34:40 +0100 Subject: [PATCH 06/69] Update translations --- djangocms_blog/cms_appconfig.py | 4 + .../locale/ar/LC_MESSAGES/django.mo | Bin 1194 -> 1194 bytes .../locale/ar/LC_MESSAGES/django.po | 153 ++--- .../locale/de/LC_MESSAGES/django.mo | Bin 2914 -> 2914 bytes .../locale/de/LC_MESSAGES/django.po | 153 ++--- .../locale/en/LC_MESSAGES/django.mo | Bin 2365 -> 2365 bytes .../locale/en/LC_MESSAGES/django.po | 153 ++--- .../locale/es/LC_MESSAGES/django.mo | Bin 3053 -> 3053 bytes .../locale/es/LC_MESSAGES/django.po | 153 ++--- .../locale/it/LC_MESSAGES/django.mo | Bin 7403 -> 7532 bytes .../locale/it/LC_MESSAGES/django.po | 153 ++--- .../locale/lt/LC_MESSAGES/django.mo | Bin 7205 -> 8017 bytes .../locale/lt/LC_MESSAGES/django.po | 181 +++--- .../locale/pt_BR/LC_MESSAGES/django.mo | Bin 520 -> 520 bytes .../locale/pt_BR/LC_MESSAGES/django.po | 153 ++--- .../locale/ru/LC_MESSAGES/django.mo | Bin 3798 -> 9681 bytes .../locale/ru/LC_MESSAGES/django.po | 316 ++++++----- .../locale/sl/LC_MESSAGES/django.mo | Bin 0 -> 6365 bytes .../locale/sl/LC_MESSAGES/django.po | 535 ++++++++++++++++++ .../locale/tr/LC_MESSAGES/django.mo | Bin 2975 -> 2975 bytes .../locale/tr/LC_MESSAGES/django.po | 155 ++--- .../migrations/0012_auto_20151220_1734.py | 18 + 22 files changed, 1384 insertions(+), 743 deletions(-) create mode 100644 djangocms_blog/locale/sl/LC_MESSAGES/django.mo create mode 100644 djangocms_blog/locale/sl/LC_MESSAGES/django.po create mode 100644 djangocms_blog/migrations/0012_auto_20151220_1734.py diff --git a/djangocms_blog/cms_appconfig.py b/djangocms_blog/cms_appconfig.py index 996a8bd..3260d71 100644 --- a/djangocms_blog/cms_appconfig.py +++ b/djangocms_blog/cms_appconfig.py @@ -23,6 +23,10 @@ class BlogConfig(TranslatableModel, AppHookConfig): ), ) + class Meta: + verbose_name = _('blog config') + verbose_name_plural = _('blog configs') + def get_app_title(self): return getattr(self, 'app_title', _('untitled')) diff --git a/djangocms_blog/locale/ar/LC_MESSAGES/django.mo b/djangocms_blog/locale/ar/LC_MESSAGES/django.mo index ff9da4c55666edf531c1a938e162c8908c70f0bb..5fe4051cb72e711bef73f17a97214dd90f696729 100644 GIT binary patch delta 38 ocmZ3*xr%ecb4D&BT_XbpLvt%blgS?$<)BK=Kufz delta 38 ncmZ3*xr%ecb4D%$U1LK9Lt`r=\n" "Language-Team: Arabic (http://www.transifex.com/nephila/djangocms-blog/language/ar/)\n" "MIME-Version: 1.0\n" @@ -26,8 +26,7 @@ msgstr "" msgid "django CMS Blog" msgstr "" -#: cms_app.py:15 cms_plugins.py:64 cms_plugins.py:77 cms_plugins.py:93 -#: cms_plugins.py:108 cms_toolbar.py:18 +#: cms_app.py:15 cms_toolbar.py:19 settings.py:111 msgid "Blog" msgstr "المدونة" @@ -40,155 +39,144 @@ msgid "object name" msgstr "" #: cms_appconfig.py:27 +#| msgid "blog categories" +msgid "blog config" +msgstr "" + +#: cms_appconfig.py:28 +#| msgid "blog categories" +msgid "blog configs" +msgstr "" + +#: cms_appconfig.py:31 msgid "untitled" msgstr "" -#: cms_appconfig.py:32 +#: cms_appconfig.py:36 msgid "Post published by default" msgstr "" -#: cms_appconfig.py:36 +#: cms_appconfig.py:40 msgid "Permalink structure" msgstr "" -#: cms_appconfig.py:41 +#: cms_appconfig.py:45 msgid "Use placeholder and plugins for article body" msgstr "" -#: cms_appconfig.py:45 +#: cms_appconfig.py:49 msgid "Use abstract field" msgstr "" -#: cms_appconfig.py:49 +#: cms_appconfig.py:53 msgid "Set author" msgstr "" -#: cms_appconfig.py:49 +#: cms_appconfig.py:53 msgid "Set author by default" msgstr "" -#: cms_appconfig.py:53 +#: cms_appconfig.py:57 msgid "Paginate size" msgstr "" -#: cms_appconfig.py:54 +#: cms_appconfig.py:58 msgid "When paginating list views, how many articles per page?" msgstr "" -#: cms_appconfig.py:57 +#: cms_appconfig.py:61 msgid "Template prefix" msgstr "" -#: cms_appconfig.py:58 +#: cms_appconfig.py:62 msgid "Alternative directory to load the blog templates from" msgstr "" -#: cms_appconfig.py:61 +#: cms_appconfig.py:65 msgid "Menu structure" msgstr "" -#: cms_appconfig.py:63 +#: cms_appconfig.py:67 msgid "Structure of the django CMS menu" msgstr "" -#: cms_appconfig.py:66 +#: cms_appconfig.py:70 msgid "Sitemap changefreq" msgstr "" -#: cms_appconfig.py:69 +#: cms_appconfig.py:73 msgid "Changefreq attribute for sitemap items" msgstr "" -#: cms_appconfig.py:72 +#: cms_appconfig.py:76 msgid "Sitemap priority" msgstr "" -#: cms_appconfig.py:74 +#: cms_appconfig.py:78 msgid "Priority attribute for sitemap items" msgstr "" -#: cms_appconfig.py:77 +#: cms_appconfig.py:81 msgid "Object type" msgstr "" -#: cms_appconfig.py:81 +#: cms_appconfig.py:85 msgid "Facebook type" msgstr "" -#: cms_appconfig.py:85 +#: cms_appconfig.py:89 msgid "Facebook application ID" msgstr "" -#: cms_appconfig.py:89 +#: cms_appconfig.py:93 msgid "Facebook profile ID" msgstr "" -#: cms_appconfig.py:93 +#: cms_appconfig.py:97 msgid "Facebook page URL" msgstr "" -#: cms_appconfig.py:97 +#: cms_appconfig.py:101 msgid "Facebook author URL" msgstr "" -#: cms_appconfig.py:101 +#: cms_appconfig.py:105 msgid "Facebook author" msgstr "" -#: cms_appconfig.py:105 +#: cms_appconfig.py:109 msgid "Twitter type" msgstr "" -#: cms_appconfig.py:109 +#: cms_appconfig.py:113 msgid "Twitter site handle" msgstr "" -#: cms_appconfig.py:113 +#: cms_appconfig.py:117 msgid "Twitter author handle" msgstr "" -#: cms_appconfig.py:117 +#: cms_appconfig.py:121 msgid "Google+ type" msgstr "" -#: cms_appconfig.py:121 +#: cms_appconfig.py:125 msgid "Google+ author name" msgstr "" -#: cms_plugins.py:30 cms_plugins.py:49 -msgid "Latest Blog Articles" -msgstr "آخر مواضيع المدونة" - -#: cms_plugins.py:65 -msgid "Author Blog Articles" -msgstr "ناشر مواضيع المدونة" - -#: cms_plugins.py:78 templates/djangocms_blog/plugins/tags.html:3 -msgid "Tags" -msgstr "علامات" - -#: cms_plugins.py:94 templates/djangocms_blog/plugins/categories.html:3 -msgid "Categories" -msgstr "الأقسام" - -#: cms_plugins.py:109 templates/djangocms_blog/plugins/archive.html:3 -#: templates/djangocms_blog/post_list.html:12 -msgid "Archive" -msgstr "الأرشيف" - -#: cms_toolbar.py:21 +#: cms_toolbar.py:22 msgid "Post list" msgstr "قائمة المواضيع" -#: cms_toolbar.py:23 +#: cms_toolbar.py:24 msgid "Add post" msgstr "إضافة موضوع" -#: cms_toolbar.py:27 +#: cms_toolbar.py:28 msgid "Edit configuration" msgstr "" -#: cms_toolbar.py:31 +#: cms_toolbar.py:32 msgid "Edit Post" msgstr "التعديل على موضوع" @@ -223,7 +211,7 @@ msgstr "" msgid "modified at" msgstr "" -#: models.py:38 models.py:123 models.py:276 +#: models.py:38 models.py:123 models.py:275 msgid "app. config" msgstr "" @@ -333,52 +321,52 @@ msgstr "" msgid "blog articles" msgstr "" -#: models.py:293 -msgid "generic blog plugin" -msgstr "" - -#: models.py:297 models.py:330 +#: models.py:294 models.py:328 msgid "articles" msgstr "" -#: models.py:298 +#: models.py:295 msgid "The number of latests articles to be displayed." msgstr "" -#: models.py:300 +#: models.py:297 msgid "filter by tag" msgstr "" -#: models.py:301 +#: models.py:298 msgid "Show only the blog articles tagged with chosen tags." msgstr "" -#: models.py:304 +#: models.py:301 msgid "filter by category" msgstr "" -#: models.py:305 +#: models.py:302 msgid "Show only the blog articles tagged with chosen categories." msgstr "" -#: models.py:309 +#: models.py:306 #, python-format msgid "%s latest articles by tag" msgstr "" -#: models.py:326 +#: models.py:324 msgid "authors" msgstr "" -#: models.py:331 +#: models.py:329 msgid "The number of author articles to be displayed." msgstr "" -#: models.py:335 +#: models.py:333 #, python-format msgid "%s latest articles by author" msgstr "" +#: models.py:362 +msgid "generic blog plugin" +msgstr "" + #: settings.py:16 msgid "Full date" msgstr "" @@ -439,6 +427,27 @@ msgstr "" msgid "never" msgstr "" +#: settings.py:113 +msgid "Latest Blog Articles" +msgstr "آخر مواضيع المدونة" + +#: settings.py:115 +msgid "Author Blog Articles" +msgstr "ناشر مواضيع المدونة" + +#: settings.py:117 templates/djangocms_blog/plugins/tags.html:3 +msgid "Tags" +msgstr "علامات" + +#: settings.py:119 templates/djangocms_blog/plugins/categories.html:3 +msgid "Categories" +msgstr "الأقسام" + +#: settings.py:121 templates/djangocms_blog/plugins/archive.html:3 +#: templates/djangocms_blog/post_list.html:12 +msgid "Archive" +msgstr "الأرشيف" + #: templates/djangocms_blog/includes/blog_item.html:24 msgid "read more" msgstr "" diff --git a/djangocms_blog/locale/de/LC_MESSAGES/django.mo b/djangocms_blog/locale/de/LC_MESSAGES/django.mo index c1e7519dd30e223910090178aa49f0afd97735a2..b19d3ac51a9e56d174ede04261460f05adef053c 100644 GIT binary patch delta 38 ocmaDP_DF2QB{nW2T_XbpLvt%blgW43i}\n" "Language-Team: German (http://www.transifex.com/nephila/djangocms-blog/language/de/)\n" "MIME-Version: 1.0\n" @@ -26,8 +26,7 @@ msgstr "" msgid "django CMS Blog" msgstr "" -#: cms_app.py:15 cms_plugins.py:64 cms_plugins.py:77 cms_plugins.py:93 -#: cms_plugins.py:108 cms_toolbar.py:18 +#: cms_app.py:15 cms_toolbar.py:19 settings.py:111 msgid "Blog" msgstr "Blog" @@ -40,155 +39,144 @@ msgid "object name" msgstr "" #: cms_appconfig.py:27 +#| msgid "blog categories" +msgid "blog config" +msgstr "" + +#: cms_appconfig.py:28 +#| msgid "blog categories" +msgid "blog configs" +msgstr "" + +#: cms_appconfig.py:31 msgid "untitled" msgstr "" -#: cms_appconfig.py:32 +#: cms_appconfig.py:36 msgid "Post published by default" msgstr "" -#: cms_appconfig.py:36 +#: cms_appconfig.py:40 msgid "Permalink structure" msgstr "" -#: cms_appconfig.py:41 +#: cms_appconfig.py:45 msgid "Use placeholder and plugins for article body" msgstr "" -#: cms_appconfig.py:45 +#: cms_appconfig.py:49 msgid "Use abstract field" msgstr "" -#: cms_appconfig.py:49 +#: cms_appconfig.py:53 msgid "Set author" msgstr "" -#: cms_appconfig.py:49 +#: cms_appconfig.py:53 msgid "Set author by default" msgstr "" -#: cms_appconfig.py:53 +#: cms_appconfig.py:57 msgid "Paginate size" msgstr "" -#: cms_appconfig.py:54 +#: cms_appconfig.py:58 msgid "When paginating list views, how many articles per page?" msgstr "" -#: cms_appconfig.py:57 +#: cms_appconfig.py:61 msgid "Template prefix" msgstr "" -#: cms_appconfig.py:58 +#: cms_appconfig.py:62 msgid "Alternative directory to load the blog templates from" msgstr "" -#: cms_appconfig.py:61 +#: cms_appconfig.py:65 msgid "Menu structure" msgstr "" -#: cms_appconfig.py:63 +#: cms_appconfig.py:67 msgid "Structure of the django CMS menu" msgstr "" -#: cms_appconfig.py:66 +#: cms_appconfig.py:70 msgid "Sitemap changefreq" msgstr "" -#: cms_appconfig.py:69 +#: cms_appconfig.py:73 msgid "Changefreq attribute for sitemap items" msgstr "" -#: cms_appconfig.py:72 +#: cms_appconfig.py:76 msgid "Sitemap priority" msgstr "" -#: cms_appconfig.py:74 +#: cms_appconfig.py:78 msgid "Priority attribute for sitemap items" msgstr "" -#: cms_appconfig.py:77 +#: cms_appconfig.py:81 msgid "Object type" msgstr "" -#: cms_appconfig.py:81 +#: cms_appconfig.py:85 msgid "Facebook type" msgstr "" -#: cms_appconfig.py:85 +#: cms_appconfig.py:89 msgid "Facebook application ID" msgstr "" -#: cms_appconfig.py:89 +#: cms_appconfig.py:93 msgid "Facebook profile ID" msgstr "" -#: cms_appconfig.py:93 +#: cms_appconfig.py:97 msgid "Facebook page URL" msgstr "" -#: cms_appconfig.py:97 +#: cms_appconfig.py:101 msgid "Facebook author URL" msgstr "" -#: cms_appconfig.py:101 +#: cms_appconfig.py:105 msgid "Facebook author" msgstr "" -#: cms_appconfig.py:105 +#: cms_appconfig.py:109 msgid "Twitter type" msgstr "" -#: cms_appconfig.py:109 +#: cms_appconfig.py:113 msgid "Twitter site handle" msgstr "" -#: cms_appconfig.py:113 +#: cms_appconfig.py:117 msgid "Twitter author handle" msgstr "" -#: cms_appconfig.py:117 +#: cms_appconfig.py:121 msgid "Google+ type" msgstr "" -#: cms_appconfig.py:121 +#: cms_appconfig.py:125 msgid "Google+ author name" msgstr "" -#: cms_plugins.py:30 cms_plugins.py:49 -msgid "Latest Blog Articles" -msgstr "Letzte Blog-Einträge" - -#: cms_plugins.py:65 -msgid "Author Blog Articles" -msgstr "Autoren Blog-Artikel" - -#: cms_plugins.py:78 templates/djangocms_blog/plugins/tags.html:3 -msgid "Tags" -msgstr "Tags" - -#: cms_plugins.py:94 templates/djangocms_blog/plugins/categories.html:3 -msgid "Categories" -msgstr "Kategorien" - -#: cms_plugins.py:109 templates/djangocms_blog/plugins/archive.html:3 -#: templates/djangocms_blog/post_list.html:12 -msgid "Archive" -msgstr "Archiv" - -#: cms_toolbar.py:21 +#: cms_toolbar.py:22 msgid "Post list" msgstr "Post Liste" -#: cms_toolbar.py:23 +#: cms_toolbar.py:24 msgid "Add post" msgstr "Post hinzufügen" -#: cms_toolbar.py:27 +#: cms_toolbar.py:28 msgid "Edit configuration" msgstr "" -#: cms_toolbar.py:31 +#: cms_toolbar.py:32 msgid "Edit Post" msgstr "Post bearbeiten" @@ -223,7 +211,7 @@ msgstr "erstellt am" msgid "modified at" msgstr "bearbeitet am" -#: models.py:38 models.py:123 models.py:276 +#: models.py:38 models.py:123 models.py:275 msgid "app. config" msgstr "" @@ -333,52 +321,52 @@ msgstr "Blog-Artikel" msgid "blog articles" msgstr "Blog-Artikel" -#: models.py:293 -msgid "generic blog plugin" -msgstr "" - -#: models.py:297 models.py:330 +#: models.py:294 models.py:328 msgid "articles" msgstr "" -#: models.py:298 +#: models.py:295 msgid "The number of latests articles to be displayed." msgstr "Anzahl der anzuzeigenden letzten Artikel" -#: models.py:300 +#: models.py:297 msgid "filter by tag" msgstr "" -#: models.py:301 +#: models.py:298 msgid "Show only the blog articles tagged with chosen tags." msgstr "Nur die Blog-Einträge mit dem ausgewählten Tag anzeigen" -#: models.py:304 +#: models.py:301 msgid "filter by category" msgstr "" -#: models.py:305 +#: models.py:302 msgid "Show only the blog articles tagged with chosen categories." msgstr "Nur die Blog-Einträge der ausgewählten Kategorie anzeigen" -#: models.py:309 +#: models.py:306 #, python-format msgid "%s latest articles by tag" msgstr "" -#: models.py:326 +#: models.py:324 msgid "authors" msgstr "" -#: models.py:331 +#: models.py:329 msgid "The number of author articles to be displayed." msgstr "Die Anzahl der anzuzeigenden Autoren-Artikel" -#: models.py:335 +#: models.py:333 #, python-format msgid "%s latest articles by author" msgstr "" +#: models.py:362 +msgid "generic blog plugin" +msgstr "" + #: settings.py:16 msgid "Full date" msgstr "" @@ -439,6 +427,27 @@ msgstr "" msgid "never" msgstr "" +#: settings.py:113 +msgid "Latest Blog Articles" +msgstr "Letzte Blog-Einträge" + +#: settings.py:115 +msgid "Author Blog Articles" +msgstr "Autoren Blog-Artikel" + +#: settings.py:117 templates/djangocms_blog/plugins/tags.html:3 +msgid "Tags" +msgstr "Tags" + +#: settings.py:119 templates/djangocms_blog/plugins/categories.html:3 +msgid "Categories" +msgstr "Kategorien" + +#: settings.py:121 templates/djangocms_blog/plugins/archive.html:3 +#: templates/djangocms_blog/post_list.html:12 +msgid "Archive" +msgstr "Archiv" + #: templates/djangocms_blog/includes/blog_item.html:24 msgid "read more" msgstr "weiterlesen" diff --git a/djangocms_blog/locale/en/LC_MESSAGES/django.mo b/djangocms_blog/locale/en/LC_MESSAGES/django.mo index 088464b86fb16476bb16611ca2dee88e83b8d4e7..032c5f2aa65538f0f6896b9b93151f69ec358651 100644 GIT binary patch delta 23 ecmdlhv{z`uIaV$sT_XbpLvt%blg&3+Q<(u\n" @@ -25,8 +25,7 @@ msgstr "" msgid "django CMS Blog" msgstr "" -#: cms_app.py:15 cms_plugins.py:64 cms_plugins.py:77 cms_plugins.py:93 -#: cms_plugins.py:108 cms_toolbar.py:18 +#: cms_app.py:15 cms_toolbar.py:19 settings.py:111 msgid "Blog" msgstr "Blog" @@ -40,157 +39,148 @@ msgstr "" #: cms_appconfig.py:27 #, fuzzy +#| msgid "blog categories" +msgid "blog config" +msgstr "blog categories" + +#: cms_appconfig.py:28 +#, fuzzy +#| msgid "blog categories" +msgid "blog configs" +msgstr "blog categories" + +#: cms_appconfig.py:31 +#, fuzzy msgid "untitled" msgstr "Title" -#: cms_appconfig.py:32 +#: cms_appconfig.py:36 msgid "Post published by default" msgstr "" -#: cms_appconfig.py:36 +#: cms_appconfig.py:40 msgid "Permalink structure" msgstr "" -#: cms_appconfig.py:41 +#: cms_appconfig.py:45 msgid "Use placeholder and plugins for article body" msgstr "" -#: cms_appconfig.py:45 +#: cms_appconfig.py:49 msgid "Use abstract field" msgstr "" -#: cms_appconfig.py:49 +#: cms_appconfig.py:53 #, fuzzy msgid "Set author" msgstr "Author" -#: cms_appconfig.py:49 +#: cms_appconfig.py:53 msgid "Set author by default" msgstr "" -#: cms_appconfig.py:53 +#: cms_appconfig.py:57 msgid "Paginate size" msgstr "" -#: cms_appconfig.py:54 +#: cms_appconfig.py:58 msgid "When paginating list views, how many articles per page?" msgstr "" -#: cms_appconfig.py:57 +#: cms_appconfig.py:61 msgid "Template prefix" msgstr "" -#: cms_appconfig.py:58 +#: cms_appconfig.py:62 msgid "Alternative directory to load the blog templates from" msgstr "" -#: cms_appconfig.py:61 +#: cms_appconfig.py:65 msgid "Menu structure" msgstr "" -#: cms_appconfig.py:63 +#: cms_appconfig.py:67 msgid "Structure of the django CMS menu" msgstr "" -#: cms_appconfig.py:66 +#: cms_appconfig.py:70 msgid "Sitemap changefreq" msgstr "" -#: cms_appconfig.py:69 +#: cms_appconfig.py:73 msgid "Changefreq attribute for sitemap items" msgstr "" -#: cms_appconfig.py:72 +#: cms_appconfig.py:76 msgid "Sitemap priority" msgstr "" -#: cms_appconfig.py:74 +#: cms_appconfig.py:78 msgid "Priority attribute for sitemap items" msgstr "" -#: cms_appconfig.py:77 +#: cms_appconfig.py:81 msgid "Object type" msgstr "" -#: cms_appconfig.py:81 +#: cms_appconfig.py:85 msgid "Facebook type" msgstr "" -#: cms_appconfig.py:85 +#: cms_appconfig.py:89 msgid "Facebook application ID" msgstr "" -#: cms_appconfig.py:89 +#: cms_appconfig.py:93 msgid "Facebook profile ID" msgstr "" -#: cms_appconfig.py:93 +#: cms_appconfig.py:97 msgid "Facebook page URL" msgstr "" -#: cms_appconfig.py:97 +#: cms_appconfig.py:101 msgid "Facebook author URL" msgstr "" -#: cms_appconfig.py:101 +#: cms_appconfig.py:105 #, fuzzy msgid "Facebook author" msgstr "Author" -#: cms_appconfig.py:105 +#: cms_appconfig.py:109 msgid "Twitter type" msgstr "" -#: cms_appconfig.py:109 +#: cms_appconfig.py:113 msgid "Twitter site handle" msgstr "" -#: cms_appconfig.py:113 +#: cms_appconfig.py:117 msgid "Twitter author handle" msgstr "" -#: cms_appconfig.py:117 +#: cms_appconfig.py:121 msgid "Google+ type" msgstr "" -#: cms_appconfig.py:121 +#: cms_appconfig.py:125 msgid "Google+ author name" msgstr "" -#: cms_plugins.py:30 cms_plugins.py:49 -msgid "Latest Blog Articles" -msgstr "Latest Blog Articles" - -#: cms_plugins.py:65 -msgid "Author Blog Articles" -msgstr "Author Blog Articles" - -#: cms_plugins.py:78 templates/djangocms_blog/plugins/tags.html:3 -msgid "Tags" -msgstr "Tags" - -#: cms_plugins.py:94 templates/djangocms_blog/plugins/categories.html:3 -msgid "Categories" -msgstr "Categories" - -#: cms_plugins.py:109 templates/djangocms_blog/plugins/archive.html:3 -#: templates/djangocms_blog/post_list.html:12 -msgid "Archive" -msgstr "Archive" - -#: cms_toolbar.py:21 +#: cms_toolbar.py:22 msgid "Post list" msgstr "Post list" -#: cms_toolbar.py:23 +#: cms_toolbar.py:24 msgid "Add post" msgstr "Add post" -#: cms_toolbar.py:27 +#: cms_toolbar.py:28 msgid "Edit configuration" msgstr "" -#: cms_toolbar.py:31 +#: cms_toolbar.py:32 msgid "Edit Post" msgstr "" @@ -226,7 +216,7 @@ msgstr "created at" msgid "modified at" msgstr "modified at" -#: models.py:38 models.py:123 models.py:276 +#: models.py:38 models.py:123 models.py:275 msgid "app. config" msgstr "" @@ -349,55 +339,55 @@ msgstr "blog article" msgid "blog articles" msgstr "blog articles" -#: models.py:293 -msgid "generic blog plugin" -msgstr "" - -#: models.py:297 models.py:330 +#: models.py:294 models.py:328 #, fuzzy msgid "articles" msgstr "0 articles" -#: models.py:298 +#: models.py:295 msgid "The number of latests articles to be displayed." msgstr "The number of latests articles to be displayed." -#: models.py:300 +#: models.py:297 msgid "filter by tag" msgstr "" -#: models.py:301 +#: models.py:298 msgid "Show only the blog articles tagged with chosen tags." msgstr "Show only the blog articles tagged with chosen tags." -#: models.py:304 +#: models.py:301 #, fuzzy msgid "filter by category" msgstr "blog category" -#: models.py:305 +#: models.py:302 msgid "Show only the blog articles tagged with chosen categories." msgstr "Show only the blog articles tagged with chosen categories." -#: models.py:309 +#: models.py:306 #, python-format msgid "%s latest articles by tag" msgstr "" -#: models.py:326 +#: models.py:324 #, fuzzy msgid "authors" msgstr "Authors" -#: models.py:331 +#: models.py:329 msgid "The number of author articles to be displayed." msgstr "The number of author articles to be displayed." -#: models.py:335 +#: models.py:333 #, python-format msgid "%s latest articles by author" msgstr "" +#: models.py:362 +msgid "generic blog plugin" +msgstr "" + #: settings.py:16 msgid "Full date" msgstr "" @@ -462,6 +452,27 @@ msgstr "" msgid "never" msgstr "" +#: settings.py:113 +msgid "Latest Blog Articles" +msgstr "Latest Blog Articles" + +#: settings.py:115 +msgid "Author Blog Articles" +msgstr "Author Blog Articles" + +#: settings.py:117 templates/djangocms_blog/plugins/tags.html:3 +msgid "Tags" +msgstr "Tags" + +#: settings.py:119 templates/djangocms_blog/plugins/categories.html:3 +msgid "Categories" +msgstr "Categories" + +#: settings.py:121 templates/djangocms_blog/plugins/archive.html:3 +#: templates/djangocms_blog/post_list.html:12 +msgid "Archive" +msgstr "Archive" + #: templates/djangocms_blog/includes/blog_item.html:24 msgid "read more" msgstr "read more" diff --git a/djangocms_blog/locale/es/LC_MESSAGES/django.mo b/djangocms_blog/locale/es/LC_MESSAGES/django.mo index 96ec7ec3cd4a05ee92e4672b8a78d0f8df668f71..dc352612e4ba66c6d38bd980d6826c79a7af1bd9 100644 GIT binary patch delta 38 ocmaDW{#Ja$B{nW2T_XbpLvt%blgW43i}\n" "Language-Team: Spanish (http://www.transifex.com/nephila/djangocms-blog/language/es/)\n" "MIME-Version: 1.0\n" @@ -26,8 +26,7 @@ msgstr "" msgid "django CMS Blog" msgstr "" -#: cms_app.py:15 cms_plugins.py:64 cms_plugins.py:77 cms_plugins.py:93 -#: cms_plugins.py:108 cms_toolbar.py:18 +#: cms_app.py:15 cms_toolbar.py:19 settings.py:111 msgid "Blog" msgstr "Blog" @@ -40,155 +39,144 @@ msgid "object name" msgstr "" #: cms_appconfig.py:27 +#| msgid "blog categories" +msgid "blog config" +msgstr "" + +#: cms_appconfig.py:28 +#| msgid "blog categories" +msgid "blog configs" +msgstr "" + +#: cms_appconfig.py:31 msgid "untitled" msgstr "" -#: cms_appconfig.py:32 +#: cms_appconfig.py:36 msgid "Post published by default" msgstr "" -#: cms_appconfig.py:36 +#: cms_appconfig.py:40 msgid "Permalink structure" msgstr "" -#: cms_appconfig.py:41 +#: cms_appconfig.py:45 msgid "Use placeholder and plugins for article body" msgstr "" -#: cms_appconfig.py:45 +#: cms_appconfig.py:49 msgid "Use abstract field" msgstr "" -#: cms_appconfig.py:49 +#: cms_appconfig.py:53 msgid "Set author" msgstr "" -#: cms_appconfig.py:49 +#: cms_appconfig.py:53 msgid "Set author by default" msgstr "" -#: cms_appconfig.py:53 +#: cms_appconfig.py:57 msgid "Paginate size" msgstr "" -#: cms_appconfig.py:54 +#: cms_appconfig.py:58 msgid "When paginating list views, how many articles per page?" msgstr "" -#: cms_appconfig.py:57 +#: cms_appconfig.py:61 msgid "Template prefix" msgstr "" -#: cms_appconfig.py:58 +#: cms_appconfig.py:62 msgid "Alternative directory to load the blog templates from" msgstr "" -#: cms_appconfig.py:61 +#: cms_appconfig.py:65 msgid "Menu structure" msgstr "" -#: cms_appconfig.py:63 +#: cms_appconfig.py:67 msgid "Structure of the django CMS menu" msgstr "" -#: cms_appconfig.py:66 +#: cms_appconfig.py:70 msgid "Sitemap changefreq" msgstr "" -#: cms_appconfig.py:69 +#: cms_appconfig.py:73 msgid "Changefreq attribute for sitemap items" msgstr "" -#: cms_appconfig.py:72 +#: cms_appconfig.py:76 msgid "Sitemap priority" msgstr "" -#: cms_appconfig.py:74 +#: cms_appconfig.py:78 msgid "Priority attribute for sitemap items" msgstr "" -#: cms_appconfig.py:77 +#: cms_appconfig.py:81 msgid "Object type" msgstr "" -#: cms_appconfig.py:81 +#: cms_appconfig.py:85 msgid "Facebook type" msgstr "" -#: cms_appconfig.py:85 +#: cms_appconfig.py:89 msgid "Facebook application ID" msgstr "" -#: cms_appconfig.py:89 +#: cms_appconfig.py:93 msgid "Facebook profile ID" msgstr "" -#: cms_appconfig.py:93 +#: cms_appconfig.py:97 msgid "Facebook page URL" msgstr "" -#: cms_appconfig.py:97 +#: cms_appconfig.py:101 msgid "Facebook author URL" msgstr "" -#: cms_appconfig.py:101 +#: cms_appconfig.py:105 msgid "Facebook author" msgstr "" -#: cms_appconfig.py:105 +#: cms_appconfig.py:109 msgid "Twitter type" msgstr "" -#: cms_appconfig.py:109 +#: cms_appconfig.py:113 msgid "Twitter site handle" msgstr "" -#: cms_appconfig.py:113 +#: cms_appconfig.py:117 msgid "Twitter author handle" msgstr "" -#: cms_appconfig.py:117 +#: cms_appconfig.py:121 msgid "Google+ type" msgstr "" -#: cms_appconfig.py:121 +#: cms_appconfig.py:125 msgid "Google+ author name" msgstr "" -#: cms_plugins.py:30 cms_plugins.py:49 -msgid "Latest Blog Articles" -msgstr "Últimos artículos del blog" - -#: cms_plugins.py:65 -msgid "Author Blog Articles" -msgstr "Artículos del blog por author" - -#: cms_plugins.py:78 templates/djangocms_blog/plugins/tags.html:3 -msgid "Tags" -msgstr "Etiquetas" - -#: cms_plugins.py:94 templates/djangocms_blog/plugins/categories.html:3 -msgid "Categories" -msgstr "Categorías" - -#: cms_plugins.py:109 templates/djangocms_blog/plugins/archive.html:3 -#: templates/djangocms_blog/post_list.html:12 -msgid "Archive" -msgstr "Archivo" - -#: cms_toolbar.py:21 +#: cms_toolbar.py:22 msgid "Post list" msgstr "Lista de entradas" -#: cms_toolbar.py:23 +#: cms_toolbar.py:24 msgid "Add post" msgstr "Añadir entradas" -#: cms_toolbar.py:27 +#: cms_toolbar.py:28 msgid "Edit configuration" msgstr "" -#: cms_toolbar.py:31 +#: cms_toolbar.py:32 msgid "Edit Post" msgstr "Editar entrada" @@ -223,7 +211,7 @@ msgstr "Creado en" msgid "modified at" msgstr "Actualizado en" -#: models.py:38 models.py:123 models.py:276 +#: models.py:38 models.py:123 models.py:275 msgid "app. config" msgstr "" @@ -333,52 +321,52 @@ msgstr "artículo del blog" msgid "blog articles" msgstr "artículos del blog" -#: models.py:293 -msgid "generic blog plugin" -msgstr "" - -#: models.py:297 models.py:330 +#: models.py:294 models.py:328 msgid "articles" msgstr "" -#: models.py:298 +#: models.py:295 msgid "The number of latests articles to be displayed." msgstr "El número de últimos artículos a mostrar." -#: models.py:300 +#: models.py:297 msgid "filter by tag" msgstr "" -#: models.py:301 +#: models.py:298 msgid "Show only the blog articles tagged with chosen tags." msgstr "Mostrar solo los artículos del blog etiquetados con las etiquetas elegidas." -#: models.py:304 +#: models.py:301 msgid "filter by category" msgstr "" -#: models.py:305 +#: models.py:302 msgid "Show only the blog articles tagged with chosen categories." msgstr "Mostrar solo los artículos del blog etiquetados con las categorías elegidas." -#: models.py:309 +#: models.py:306 #, python-format msgid "%s latest articles by tag" msgstr "" -#: models.py:326 +#: models.py:324 msgid "authors" msgstr "" -#: models.py:331 +#: models.py:329 msgid "The number of author articles to be displayed." msgstr "El número de autores de artículo a mostrar." -#: models.py:335 +#: models.py:333 #, python-format msgid "%s latest articles by author" msgstr "" +#: models.py:362 +msgid "generic blog plugin" +msgstr "" + #: settings.py:16 msgid "Full date" msgstr "" @@ -439,6 +427,27 @@ msgstr "" msgid "never" msgstr "" +#: settings.py:113 +msgid "Latest Blog Articles" +msgstr "Últimos artículos del blog" + +#: settings.py:115 +msgid "Author Blog Articles" +msgstr "Artículos del blog por author" + +#: settings.py:117 templates/djangocms_blog/plugins/tags.html:3 +msgid "Tags" +msgstr "Etiquetas" + +#: settings.py:119 templates/djangocms_blog/plugins/categories.html:3 +msgid "Categories" +msgstr "Categorías" + +#: settings.py:121 templates/djangocms_blog/plugins/archive.html:3 +#: templates/djangocms_blog/post_list.html:12 +msgid "Archive" +msgstr "Archivo" + #: templates/djangocms_blog/includes/blog_item.html:24 msgid "read more" msgstr "leer más" diff --git a/djangocms_blog/locale/it/LC_MESSAGES/django.mo b/djangocms_blog/locale/it/LC_MESSAGES/django.mo index bc88be3c89df875315d24eec9d7e60b4daeb31c8..2217f6274bfa067afeb052b7b30a8622020c7fb1 100644 GIT binary patch delta 2731 zcmY+_e@xVM9LMob1c;CXSA-zKK|qpva>ogAikKKw5I;0ii3srEI6&}6+AU|d?3bI) zIl=W$vX;x%S}nb{YU#2co8@X1wKbPv&doKIt!ArMVLe}WpXP|*Mts2gjLKhtLWJ5h=BV><3ct#B`Dz%hIM2x?{T zB6FCNw*4v2qWvXm{Bx-Ju3`@Jn`tUqaW;1qV-faY1FHXZ%))ojho7StQ^`h&)S_12 zfEn11P8>v@rrC>1Y(Hv84x$TR!tf$0UsKTpiCk5NxkygNg&KGXF2H82!W~EsCW3YN zKI+jVF?%wmqjn$*wL^ud>lOC;QdHt~8SK9%YNSI0u0zH$eYU+FHPBP2`}Si39zqTH z0&1XFP&;)LlkhldoDWcEWCFF2OQ?CKQ43AWWdD_M0cq+&DQX}uYJghQvu{Bq;zv!m z3ALpm)Py^2`$^P&yHSabp~im>wZr46MBYS=e=1BxEBOXB@b~t@57ysMhb4t?X+noJ z8#Qqr>ib2gvojwxVXJj5p16*;2IuO2R+Ec9)I!5+s5q%~A#<50upCEG1Al~C(PyYF zJA;~F%3l8&mDn^EVFJt4PL^QwtwJuD8swOnRkptyJ~p7ub~cI z64|KjK)Os0Dv@&31S?TLVCzu{gwT!8;IsHPYURtBM8BXdSc5^V()<516-{ss3-BUp zCz82a&ulj8J+8F+P}i5??bwRi`W>jm#!)+R43*%=s1<*QW%wiBiMgyctY_Onr5gKD z&-_JHLa(BB;23J)_w4nr?DezO3#f!HS^q>$m_8?FA+ia^Yi&Zk9sW5ye?6N39hz`6 zsvSZlwhQ&l_Mx_T9JQhos4bm9-FF_9_!R2?Ur-4r^B+y-qIS}SdPGgAdD`>Xf1O@G z9opg`>b2O2T6qYS>C>n$>_&b&%mLIuhf((*wH`+$a>`!+0`*!?qF&dFsQIqg_D^9d zTKTW239n%Trjf2zxEeKa5AqsE|3!mYL1?Agm3Ub~Wh8@(Q1K9JiCQ)O zDLnsv8ui3N;x1wlv4x12ZB+ES#LG%5GvW>8Z8G-|gSPJx)Y({03==A=2>q(+u(lG- zL=Q2S`J>MtqW@ZD4dEv4AeIunL>IB1h!-8QcqyTBKf$3lenPLB4&`d1n`j~03EoQ6 zL~JBbU>_ delta 2612 zcmYk-eN2^A9Ki8|qL73jl!~N~DZa!znu%r!NpBL7W@b>3ij|6*Nw#cv)+)vHRWozjlZrb;I?_u-o{_f{I&vT!1e&-DaYX6*_ z_$4oWN1${O*APdChVTw<$>57}_KMW~f3Se-kt0Ij6Q=T2gf*Cni*P2kps#jg7QT&F z;rsFaeoW{3i+xlD zY5H(D{)o=N&*%)Dj?XW|=jmi=;#s-Oza8as!v>3y--PmbJr9R)y%6o734L)XIx}rJ z3|FJ?Z9wtTe zJG>MfPHzX&7&VUf_Y8X+o<;|n&ghCU2YDqVDydXbsY4syh>mCrI%V6?4tB-oyV1n< z;zaxio#OA`lgFu)hvC!{eA-p|Eq9EW4E5lJ8sI;gm2o8yBw(5dcoUAL*IBp(?e8@#^8D|h;#z!yuGt~<-2NIp z9iN}U>D<4BPW^ORH?c-^M%vK?pF&6cDo(@qa6W#GE^QVYVm6M!glpbR#f+ArGtiDU z+=)JaEuij&9a|bVh$iPr(2>(DQ}NznP};W- diff --git a/djangocms_blog/locale/it/LC_MESSAGES/django.po b/djangocms_blog/locale/it/LC_MESSAGES/django.po index 391538d..24e2c25 100644 --- a/djangocms_blog/locale/it/LC_MESSAGES/django.po +++ b/djangocms_blog/locale/it/LC_MESSAGES/django.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: djangocms-blog\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-10-31 13:23+0100\n" -"PO-Revision-Date: 2015-10-31 12:24+0000\n" +"POT-Creation-Date: 2015-12-20 17:14+0100\n" +"PO-Revision-Date: 2015-12-20 16:19+0000\n" "Last-Translator: yakky \n" "Language-Team: Italian (http://www.transifex.com/nephila/djangocms-blog/language/it/)\n" "MIME-Version: 1.0\n" @@ -27,8 +27,7 @@ msgstr "Puoi inserire stringhe, attributi o metodi del model Post" msgid "django CMS Blog" msgstr "django CMS Blog" -#: cms_app.py:15 cms_plugins.py:64 cms_plugins.py:77 cms_plugins.py:93 -#: cms_plugins.py:108 cms_toolbar.py:18 +#: cms_app.py:15 cms_toolbar.py:19 settings.py:111 msgid "Blog" msgstr "Blog" @@ -41,155 +40,144 @@ msgid "object name" msgstr "Nome oggetto" #: cms_appconfig.py:27 +#| msgid "blog categories" +msgid "blog config" +msgstr "Configurazione del blog" + +#: cms_appconfig.py:28 +#| msgid "blog categories" +msgid "blog configs" +msgstr "Configurazioni del blog" + +#: cms_appconfig.py:31 msgid "untitled" msgstr "Senza titolo" -#: cms_appconfig.py:32 +#: cms_appconfig.py:36 msgid "Post published by default" msgstr "Articoli pubblicati di default" -#: cms_appconfig.py:36 +#: cms_appconfig.py:40 msgid "Permalink structure" msgstr "Struttura permalink" -#: cms_appconfig.py:41 +#: cms_appconfig.py:45 msgid "Use placeholder and plugins for article body" msgstr "Usa placeholder e plugin per il contenuto" -#: cms_appconfig.py:45 +#: cms_appconfig.py:49 msgid "Use abstract field" msgstr "Usa campo abstract" -#: cms_appconfig.py:49 +#: cms_appconfig.py:53 msgid "Set author" msgstr "Imposta autore" -#: cms_appconfig.py:49 +#: cms_appconfig.py:53 msgid "Set author by default" msgstr "Imposta autore di default" -#: cms_appconfig.py:53 +#: cms_appconfig.py:57 msgid "Paginate size" msgstr "Dimensione paginazione" -#: cms_appconfig.py:54 +#: cms_appconfig.py:58 msgid "When paginating list views, how many articles per page?" msgstr "Se la lista è paginata, quanti articoli visualizzati per pagina?" -#: cms_appconfig.py:57 +#: cms_appconfig.py:61 msgid "Template prefix" msgstr "Prefisso template" -#: cms_appconfig.py:58 +#: cms_appconfig.py:62 msgid "Alternative directory to load the blog templates from" msgstr "Directory alternativa da cui caricare i template" -#: cms_appconfig.py:61 +#: cms_appconfig.py:65 msgid "Menu structure" msgstr "Struttura del menu" -#: cms_appconfig.py:63 +#: cms_appconfig.py:67 msgid "Structure of the django CMS menu" msgstr "Struttura del menu django CMS" -#: cms_appconfig.py:66 +#: cms_appconfig.py:70 msgid "Sitemap changefreq" msgstr "Frequenza aggiornamento Sitemap" -#: cms_appconfig.py:69 +#: cms_appconfig.py:73 msgid "Changefreq attribute for sitemap items" msgstr "Attributo Changefreq per gli oggetti della sitemap" -#: cms_appconfig.py:72 +#: cms_appconfig.py:76 msgid "Sitemap priority" msgstr "Priorità sitemap" -#: cms_appconfig.py:74 +#: cms_appconfig.py:78 msgid "Priority attribute for sitemap items" msgstr "Attributo priorità per gli oggetti nella sitemap" -#: cms_appconfig.py:77 +#: cms_appconfig.py:81 msgid "Object type" msgstr "Tipo oggetto" -#: cms_appconfig.py:81 +#: cms_appconfig.py:85 msgid "Facebook type" msgstr "Tipo oggetto Facebook" -#: cms_appconfig.py:85 +#: cms_appconfig.py:89 msgid "Facebook application ID" msgstr "ID Applicazione Facebook" -#: cms_appconfig.py:89 +#: cms_appconfig.py:93 msgid "Facebook profile ID" msgstr "ID Profilo Facebook" -#: cms_appconfig.py:93 +#: cms_appconfig.py:97 msgid "Facebook page URL" msgstr "URL Pagina Facebook" -#: cms_appconfig.py:97 +#: cms_appconfig.py:101 msgid "Facebook author URL" msgstr "URL Autore Facebook" -#: cms_appconfig.py:101 +#: cms_appconfig.py:105 msgid "Facebook author" msgstr "Autore Facebook" -#: cms_appconfig.py:105 +#: cms_appconfig.py:109 msgid "Twitter type" msgstr "Tipo oggetto Twitter" -#: cms_appconfig.py:109 +#: cms_appconfig.py:113 msgid "Twitter site handle" msgstr "Nome Twitter del sito" -#: cms_appconfig.py:113 +#: cms_appconfig.py:117 msgid "Twitter author handle" msgstr "Nome Twitter autore" -#: cms_appconfig.py:117 +#: cms_appconfig.py:121 msgid "Google+ type" msgstr "Tipo oggetto Google+" -#: cms_appconfig.py:121 +#: cms_appconfig.py:125 msgid "Google+ author name" msgstr "Nome Google+ autore" -#: cms_plugins.py:30 cms_plugins.py:49 -msgid "Latest Blog Articles" -msgstr "Ultimi articoli" - -#: cms_plugins.py:65 -msgid "Author Blog Articles" -msgstr "Articoli per autore" - -#: cms_plugins.py:78 templates/djangocms_blog/plugins/tags.html:3 -msgid "Tags" -msgstr "Tag" - -#: cms_plugins.py:94 templates/djangocms_blog/plugins/categories.html:3 -msgid "Categories" -msgstr "Categorie" - -#: cms_plugins.py:109 templates/djangocms_blog/plugins/archive.html:3 -#: templates/djangocms_blog/post_list.html:12 -msgid "Archive" -msgstr "Archivio" - -#: cms_toolbar.py:21 +#: cms_toolbar.py:22 msgid "Post list" msgstr "Lista degli articoli" -#: cms_toolbar.py:23 +#: cms_toolbar.py:24 msgid "Add post" msgstr "Aggiungi articolo" -#: cms_toolbar.py:27 +#: cms_toolbar.py:28 msgid "Edit configuration" msgstr "Modifica configurazione" -#: cms_toolbar.py:31 +#: cms_toolbar.py:32 msgid "Edit Post" msgstr "Modifica articolo" @@ -224,7 +212,7 @@ msgstr "creato il" msgid "modified at" msgstr "modificato il" -#: models.py:38 models.py:123 models.py:276 +#: models.py:38 models.py:123 models.py:275 msgid "app. config" msgstr "config. app." @@ -334,52 +322,52 @@ msgstr "articolo del blog" msgid "blog articles" msgstr "articoli del blog" -#: models.py:293 -msgid "generic blog plugin" -msgstr "plugin blog" - -#: models.py:297 models.py:330 +#: models.py:294 models.py:328 msgid "articles" msgstr "articoli" -#: models.py:298 +#: models.py:295 msgid "The number of latests articles to be displayed." msgstr "Il numero di articoli da mostrare." -#: models.py:300 +#: models.py:297 msgid "filter by tag" msgstr "filtra per tag" -#: models.py:301 +#: models.py:298 msgid "Show only the blog articles tagged with chosen tags." msgstr "Mostra solo gli articoli marcati con i tag selezionati." -#: models.py:304 +#: models.py:301 msgid "filter by category" msgstr "filtra per categoria" -#: models.py:305 +#: models.py:302 msgid "Show only the blog articles tagged with chosen categories." msgstr "Mostra solo gli articoli marcati con i categorie selezionati." -#: models.py:309 +#: models.py:306 #, python-format msgid "%s latest articles by tag" msgstr "ultimi %s articoli per tag" -#: models.py:326 +#: models.py:324 msgid "authors" msgstr "autori" -#: models.py:331 +#: models.py:329 msgid "The number of author articles to be displayed." msgstr "Numero di elementi per autore da mostrare." -#: models.py:335 +#: models.py:333 #, python-format msgid "%s latest articles by author" msgstr "ultimi %s articoli per autore" +#: models.py:362 +msgid "generic blog plugin" +msgstr "plugin blog" + #: settings.py:16 msgid "Full date" msgstr "Data completa" @@ -440,6 +428,27 @@ msgstr "ogni anno" msgid "never" msgstr "mai" +#: settings.py:113 +msgid "Latest Blog Articles" +msgstr "Ultimi articoli" + +#: settings.py:115 +msgid "Author Blog Articles" +msgstr "Articoli per autore" + +#: settings.py:117 templates/djangocms_blog/plugins/tags.html:3 +msgid "Tags" +msgstr "Tag" + +#: settings.py:119 templates/djangocms_blog/plugins/categories.html:3 +msgid "Categories" +msgstr "Categorie" + +#: settings.py:121 templates/djangocms_blog/plugins/archive.html:3 +#: templates/djangocms_blog/post_list.html:12 +msgid "Archive" +msgstr "Archivio" + #: templates/djangocms_blog/includes/blog_item.html:24 msgid "read more" msgstr "leggi" diff --git a/djangocms_blog/locale/lt/LC_MESSAGES/django.mo b/djangocms_blog/locale/lt/LC_MESSAGES/django.mo index 96f67b319c242ddc4cdbfe22c7aa366e7154b866..4a7b164e852e67c04799ca78a58bcbc202d99757 100644 GIT binary patch delta 3212 zcma*od2AGA7{~EYbMQAx}ty+}|2&f#b2w2piJB4ApyJdH}P|>W$ zBM@Ui7ecCNOcaUH#ONj-5KW9NY6J}=kU$iT2T_9OADBoYet)|!jV8qSW}o@I^UltD zJoC=(?)pQG=@TOd?J$%SF^)Je(3t1&fgv0yzYfc{|ArNuk0>;TkD0`w5@+C0Y{psG zin{e_EW&5-Vtm=Q@54cyf0#FIKBh9BhJ(l$<}~s#XE^A_5WSS(Xw*Q}SdG(g3@$_6 z7sHXb(Y8NyL7so7$|*e}z}zDQw3Q?oxXSN8!WRfID#} z9!5=M2(!}4ORyBH(7_qV(=;upi7iKEWED=uD5j@T*+oSI96-(R8)OdV465US+%*M9 zV;wdjW1CIbgj-OL<{%c}QB(%LL}lnld;P4vK8RUr;zgz8UjvoVpbj16J7%gqZ^Qwd z--a4s5$eX}sLb4lgE4}-Z#`;HJdB!n531kSPz&3On&4-){YWYKS4ZE{pbmaUJ?pr`Yr9sPEOGCfbA=U@j`7x1%P~hU!0sTFB$5ez&IWg`L(tsLk;< zYQPVy`%wdbit6AHYOfqe4S3F4z-Z?}tQsfNUd(D_9V!zp&c`?^Bk6ak+(6|Zs^cQ2 zO<(3>yd0}h?FXhwCk0w>`b7Jfa}(b}!hh3BvitN8hx zi7QbP+KLnO{=Yy)1MEl5>?CS)3>cfANFi$AGSq808L!4=NZ;mBm zBYur@u#(O-u!nbJ3e&@=9HycSe1T-qe2Xm3{E15CNd6dSd_wZKw&P?e!jjvk9$y6|t6RCiIr2@8qD(q_T`yn5!9cC0-W!c3n%LcJxaY|^9eoQ8;SGfj`J1k-8e-5|0;`!6wyjtM(BN=Lul9QO;|$c=Xe^i zn$TXjhtMya-WZj83H>B%U+BN!E<%MzZf+xPB78z+9+4y#Yy6eOL_!;H3ZaeBL8xf6 z=?!TkW)Uj&d2$2jZJIa*cz`r z;jMSvAV~PDy8_Q?k0+d@A9zu>(-BG2l<-_GxK7O5;B2aS(D7r=rrHNH1%*EpmhAu-o^3tc!}9&yAaO z0zVe%a68;iKkh`maNql=@gjjsq84@~0-u4q*7ZJ?OH|4acdhf3tn4pkV?)EZLMNm! zGi20}+WcC*;C~O0JwEEj(43YF%pvmcDZ5E?p>NsjdV!nFmXG-(G&toa-EgM3;&@?% zd4+v1*85oIWW`g%b(&(Gu`ms(v777F5bfO=^OC)|#`7dZhcHb}vl8>`b_I_GTY zFSnYk;Tmghwq<9nwdIj7iv! z8Tgv3_b`_7#W}+^LMDfbQRK2OxT%A2)Qh*!kH4cjx{qA8kcZMS4Kpzh^;`um#s*Bo z4p;8SWXdN|@4p$X51YM1W)T%1x<7n|>Ua!Oa0=DXtgC;3nn4EB(+mULRL)0rP=Fdh z8LFcO)XFs@ui6njfP*U2zx_gH3C?0U#xR-^tU@j200wao*&Q23bvS~W@hEP@k8l(I zhH5W^(P$tANR?HgR%|yug6$aILgow^F8iEY4NjnzdI{5KOqPRMfdW*01?qUzq6XN2 z>R=D5oe*kZFS~LW7f?QndVdJ@-rFe_jxNb1D)hn?)Lwpy8tHea2B%Ro`O}pXcvwrB ziFz-Wo3^Y7HQ+kb3N<+S3VC z2e+L+V;to>sP|_u5AWdvAN!wbwvKXu&SVX0V!dH9yT}ZpX80vm;w@A|nN(`&gSZ-t zQ1#8I4)>!P>c)q00JRdssFk>iTG4CBSnMWh?k*O!A_zYx`0_Yf*QytsE)rv4R{iny#0;Y7*As|57~;aZ6~7_>rgY>i%j0yQ9m$8 zk;~3;TZ8YR4%;}M#@ndpyBTdRo|gX+O!ONI{aXicz%#XZcYfvjxh4K3S>y^PK zhQSpoU6Zr+VdNzrT+#slkc5BA${6322qV@#;Z{El^DckSN{rzdDcAlhxaj` z@;GYb_fR9fkLoy)*7O6EidymvT!Cv*KjF2=WnJ9#nZ1r0=qc2hIq$rLTB#4RS%1yo zIu&vZ)!_tcsei<+ID>pe(Nx5}f_R$HVA_cn37u}G5K&5K0NNf6Oy@%Fb`l#2{iD;0 zlxY7sn9-yy*zfXUx640?D_vgbZ0vL8E~n6d_02z}0;!I8Jeo6m4s}Mf|C+fz)h&ej zj~gwhj)&dMI5l~8(=2ojr!1H>-k zS%TCY-S_R}%7`7rdP2W|{4Uu}LaBTXdjVrz{{L`9tbovY$&bt?RQtTXq-n2h(bv>(=2fR%^ODn>5;t!sE({hHmlqX#htqRh zv4~>ie0pO{Wb4v^&uhz^jC5vI`XYA&fBC#$vw!ezEFbbZSDf-62^|l0_4M`hh6e1V Lo@0^RoGjnJE78}- diff --git a/djangocms_blog/locale/lt/LC_MESSAGES/django.po b/djangocms_blog/locale/lt/LC_MESSAGES/django.po index 15300de..c6658df 100644 --- a/djangocms_blog/locale/lt/LC_MESSAGES/django.po +++ b/djangocms_blog/locale/lt/LC_MESSAGES/django.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: djangocms-blog\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-10-31 13:23+0100\n" -"PO-Revision-Date: 2015-10-31 12:23+0000\n" +"POT-Creation-Date: 2015-12-20 17:14+0100\n" +"PO-Revision-Date: 2015-12-20 16:15+0000\n" "Last-Translator: yakky \n" "Language-Team: Lithuanian (http://www.transifex.com/nephila/djangocms-blog/language/lt/)\n" "MIME-Version: 1.0\n" @@ -26,8 +26,7 @@ msgstr "Galite pateikti paprasto teksto eilutes, įrašo modelio atributą arba msgid "django CMS Blog" msgstr "django CMS Tinklaraštis" -#: cms_app.py:15 cms_plugins.py:64 cms_plugins.py:77 cms_plugins.py:93 -#: cms_plugins.py:108 cms_toolbar.py:18 +#: cms_app.py:15 cms_toolbar.py:19 settings.py:111 msgid "Blog" msgstr "Tinklaraštis" @@ -37,170 +36,159 @@ msgstr "aplikacijos pavadinimas" #: cms_appconfig.py:22 msgid "object name" -msgstr "" +msgstr "objekto pavadinimas" #: cms_appconfig.py:27 +#| msgid "blog categories" +msgid "blog config" +msgstr "" + +#: cms_appconfig.py:28 +#| msgid "blog categories" +msgid "blog configs" +msgstr "" + +#: cms_appconfig.py:31 msgid "untitled" msgstr "be pavadinimo" -#: cms_appconfig.py:32 +#: cms_appconfig.py:36 msgid "Post published by default" msgstr "Pagal numatymą įrašas publikuojamas" -#: cms_appconfig.py:36 +#: cms_appconfig.py:40 msgid "Permalink structure" msgstr "Nuolatinės nuorodos struktūra" -#: cms_appconfig.py:41 +#: cms_appconfig.py:45 msgid "Use placeholder and plugins for article body" msgstr "Straipsnio tekstui naudokite rezervuotą vietą ir įskiepiuis" -#: cms_appconfig.py:45 +#: cms_appconfig.py:49 msgid "Use abstract field" msgstr "Naudoti santraukos lauką" -#: cms_appconfig.py:49 +#: cms_appconfig.py:53 msgid "Set author" msgstr "Nustatyti autorių" -#: cms_appconfig.py:49 +#: cms_appconfig.py:53 msgid "Set author by default" msgstr "Pagal numatymą nustatyti autorių" -#: cms_appconfig.py:53 +#: cms_appconfig.py:57 msgid "Paginate size" msgstr "Puslapiavimo dydis" -#: cms_appconfig.py:54 +#: cms_appconfig.py:58 msgid "When paginating list views, how many articles per page?" msgstr "Kai puslapiuojamas sąrašas, kiek straipsnių atvaizduoti puslapyje?" -#: cms_appconfig.py:57 +#: cms_appconfig.py:61 msgid "Template prefix" msgstr "Šablono priešdėlis" -#: cms_appconfig.py:58 +#: cms_appconfig.py:62 msgid "Alternative directory to load the blog templates from" msgstr "Alternatyvus katalogas iš kurio būtų užkraunami šablonai" -#: cms_appconfig.py:61 +#: cms_appconfig.py:65 msgid "Menu structure" msgstr "Meniu struktūra" -#: cms_appconfig.py:63 +#: cms_appconfig.py:67 msgid "Structure of the django CMS menu" msgstr "Django CMS meniu struktūra" -#: cms_appconfig.py:66 +#: cms_appconfig.py:70 msgid "Sitemap changefreq" -msgstr "" +msgstr "Tinklalapio medžio keitimo dažnumas" -#: cms_appconfig.py:69 +#: cms_appconfig.py:73 msgid "Changefreq attribute for sitemap items" -msgstr "" +msgstr "Keitimo dažnumo atributas tinklalapio medžio objektams" -#: cms_appconfig.py:72 +#: cms_appconfig.py:76 msgid "Sitemap priority" -msgstr "" +msgstr "Tinklalapio medžio prioritetas" -#: cms_appconfig.py:74 +#: cms_appconfig.py:78 msgid "Priority attribute for sitemap items" -msgstr "" +msgstr "Prioriteto atributas tinklalapio medžio objektams" -#: cms_appconfig.py:77 +#: cms_appconfig.py:81 msgid "Object type" msgstr "Objekto tipas" -#: cms_appconfig.py:81 +#: cms_appconfig.py:85 msgid "Facebook type" msgstr "Facebook tipas" -#: cms_appconfig.py:85 +#: cms_appconfig.py:89 msgid "Facebook application ID" msgstr "Facebook aplikacijos ID" -#: cms_appconfig.py:89 +#: cms_appconfig.py:93 msgid "Facebook profile ID" msgstr "Facebook profilio ID" -#: cms_appconfig.py:93 +#: cms_appconfig.py:97 msgid "Facebook page URL" msgstr "Facebook puslapio URL" -#: cms_appconfig.py:97 +#: cms_appconfig.py:101 msgid "Facebook author URL" msgstr "Facebook autoriaus URL" -#: cms_appconfig.py:101 +#: cms_appconfig.py:105 msgid "Facebook author" msgstr "Facebook autorius" -#: cms_appconfig.py:105 +#: cms_appconfig.py:109 msgid "Twitter type" msgstr "Twitter tipas" -#: cms_appconfig.py:109 +#: cms_appconfig.py:113 msgid "Twitter site handle" msgstr "Twitter tinklalapio vardas" -#: cms_appconfig.py:113 +#: cms_appconfig.py:117 msgid "Twitter author handle" msgstr "Twitter autoriaus vardas" -#: cms_appconfig.py:117 +#: cms_appconfig.py:121 msgid "Google+ type" msgstr "Google+ tipas" -#: cms_appconfig.py:121 +#: cms_appconfig.py:125 msgid "Google+ author name" msgstr "Goggle+ autoriaus vardas" -#: cms_plugins.py:30 cms_plugins.py:49 -msgid "Latest Blog Articles" -msgstr "Naujausi tinklaraščio straipsniai" - -#: cms_plugins.py:65 -msgid "Author Blog Articles" -msgstr "Tinklaraščio straipsnių autorius" - -#: cms_plugins.py:78 templates/djangocms_blog/plugins/tags.html:3 -msgid "Tags" -msgstr "Žymenos" - -#: cms_plugins.py:94 templates/djangocms_blog/plugins/categories.html:3 -msgid "Categories" -msgstr "Kategorijos" - -#: cms_plugins.py:109 templates/djangocms_blog/plugins/archive.html:3 -#: templates/djangocms_blog/post_list.html:12 -msgid "Archive" -msgstr "Archyvas" - -#: cms_toolbar.py:21 +#: cms_toolbar.py:22 msgid "Post list" msgstr "Straipsnių sąrašas" -#: cms_toolbar.py:23 +#: cms_toolbar.py:24 msgid "Add post" msgstr "Pridėti straipsnį" -#: cms_toolbar.py:27 +#: cms_toolbar.py:28 msgid "Edit configuration" msgstr "Redaguoti nustatymus" -#: cms_toolbar.py:31 +#: cms_toolbar.py:32 msgid "Edit Post" msgstr "Redaguoti straipsnį" #: cms_wizards.py:47 #, python-brace-format msgid "New {0}" -msgstr "" +msgstr "Naujas {0}" #: cms_wizards.py:51 #, python-brace-format msgid "Create a new {0} in {1}" -msgstr "" +msgstr "Kurti naują {0} viduje {1}" #: feeds.py:24 #, python-format @@ -223,7 +211,7 @@ msgstr "sukurta" msgid "modified at" msgstr "redaguota" -#: models.py:38 models.py:123 models.py:276 +#: models.py:38 models.py:123 models.py:275 msgid "app. config" msgstr "aplikacijos nustatymai" @@ -333,52 +321,52 @@ msgstr "tinklaraščio straipsnis" msgid "blog articles" msgstr "tinklaraščio straipsniai" -#: models.py:293 -msgid "generic blog plugin" -msgstr "bendras tinklaraščio įskiepis" - -#: models.py:297 models.py:330 +#: models.py:294 models.py:328 msgid "articles" msgstr "straipsniai" -#: models.py:298 +#: models.py:295 msgid "The number of latests articles to be displayed." msgstr "Atvaizduojamas naujausių straipsnių kiekis." -#: models.py:300 +#: models.py:297 msgid "filter by tag" msgstr "filtruoti pagal žymeną" -#: models.py:301 +#: models.py:298 msgid "Show only the blog articles tagged with chosen tags." msgstr "Atvaizduoti straipsnius su pasirinktomis žymenomis." -#: models.py:304 +#: models.py:301 msgid "filter by category" msgstr "filtruoti pagal kategoriją" -#: models.py:305 +#: models.py:302 msgid "Show only the blog articles tagged with chosen categories." msgstr "Atvaizduoti straipsnius su pasirinktomis kategorijomis." -#: models.py:309 +#: models.py:306 #, python-format msgid "%s latest articles by tag" msgstr "%s paskutiniai straipsniai pagal žymeną" -#: models.py:326 +#: models.py:324 msgid "authors" msgstr "autoriai" -#: models.py:331 +#: models.py:329 msgid "The number of author articles to be displayed." msgstr "Atvaizduojamas autoriaus straipsnių kiekis." -#: models.py:335 +#: models.py:333 #, python-format msgid "%s latest articles by author" msgstr "%s paskutiniai straipsniai pagal autorių" +#: models.py:362 +msgid "generic blog plugin" +msgstr "bendras tinklaraščio įskiepis" + #: settings.py:16 msgid "Full date" msgstr "Pilna data" @@ -413,31 +401,52 @@ msgstr "Niekas" #: settings.py:34 msgid "always" -msgstr "" +msgstr "visada" #: settings.py:35 msgid "hourly" -msgstr "" +msgstr "kas valandą" #: settings.py:36 msgid "daily" -msgstr "" +msgstr "kas dieną" #: settings.py:37 msgid "weekly" -msgstr "" +msgstr "kas savaitę" #: settings.py:38 msgid "monthly" -msgstr "" +msgstr "kas mėnesį" #: settings.py:39 msgid "yearly" -msgstr "" +msgstr "kas metus" #: settings.py:40 msgid "never" -msgstr "" +msgstr "niekada" + +#: settings.py:113 +msgid "Latest Blog Articles" +msgstr "Naujausi tinklaraščio straipsniai" + +#: settings.py:115 +msgid "Author Blog Articles" +msgstr "Tinklaraščio straipsnių autorius" + +#: settings.py:117 templates/djangocms_blog/plugins/tags.html:3 +msgid "Tags" +msgstr "Žymenos" + +#: settings.py:119 templates/djangocms_blog/plugins/categories.html:3 +msgid "Categories" +msgstr "Kategorijos" + +#: settings.py:121 templates/djangocms_blog/plugins/archive.html:3 +#: templates/djangocms_blog/post_list.html:12 +msgid "Archive" +msgstr "Archyvas" #: templates/djangocms_blog/includes/blog_item.html:24 msgid "read more" diff --git a/djangocms_blog/locale/pt_BR/LC_MESSAGES/django.mo b/djangocms_blog/locale/pt_BR/LC_MESSAGES/django.mo index 06f49565b2da2135548223e196b849e53fe4f9c0..f2864baf8952cebc826f904d8e4f86e64f47e9b1 100644 GIT binary patch delta 35 lcmeBR>0p`A!)2svWT0SZZe?gPahe>IXJ%z+x^bTuBLJe`2^atX delta 35 kcmeBR>0p`A!)2grY^Y#pY-MCTahe>IX9VPJ+~>sz0HRt64*&oF diff --git a/djangocms_blog/locale/pt_BR/LC_MESSAGES/django.po b/djangocms_blog/locale/pt_BR/LC_MESSAGES/django.po index 7048e60..bc6e694 100644 --- a/djangocms_blog/locale/pt_BR/LC_MESSAGES/django.po +++ b/djangocms_blog/locale/pt_BR/LC_MESSAGES/django.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: djangocms-blog\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-10-31 13:23+0100\n" -"PO-Revision-Date: 2015-10-31 12:23+0000\n" +"POT-Creation-Date: 2015-12-20 17:14+0100\n" +"PO-Revision-Date: 2015-12-20 16:15+0000\n" "Last-Translator: yakky \n" "Language-Team: Portuguese (Brazil) (http://www.transifex.com/nephila/djangocms-blog/language/pt_BR/)\n" "MIME-Version: 1.0\n" @@ -25,8 +25,7 @@ msgstr "" msgid "django CMS Blog" msgstr "" -#: cms_app.py:15 cms_plugins.py:64 cms_plugins.py:77 cms_plugins.py:93 -#: cms_plugins.py:108 cms_toolbar.py:18 +#: cms_app.py:15 cms_toolbar.py:19 settings.py:111 msgid "Blog" msgstr "" @@ -39,155 +38,144 @@ msgid "object name" msgstr "" #: cms_appconfig.py:27 +#| msgid "blog categories" +msgid "blog config" +msgstr "" + +#: cms_appconfig.py:28 +#| msgid "blog categories" +msgid "blog configs" +msgstr "" + +#: cms_appconfig.py:31 msgid "untitled" msgstr "" -#: cms_appconfig.py:32 +#: cms_appconfig.py:36 msgid "Post published by default" msgstr "" -#: cms_appconfig.py:36 +#: cms_appconfig.py:40 msgid "Permalink structure" msgstr "" -#: cms_appconfig.py:41 +#: cms_appconfig.py:45 msgid "Use placeholder and plugins for article body" msgstr "" -#: cms_appconfig.py:45 +#: cms_appconfig.py:49 msgid "Use abstract field" msgstr "" -#: cms_appconfig.py:49 +#: cms_appconfig.py:53 msgid "Set author" msgstr "" -#: cms_appconfig.py:49 +#: cms_appconfig.py:53 msgid "Set author by default" msgstr "" -#: cms_appconfig.py:53 +#: cms_appconfig.py:57 msgid "Paginate size" msgstr "" -#: cms_appconfig.py:54 +#: cms_appconfig.py:58 msgid "When paginating list views, how many articles per page?" msgstr "" -#: cms_appconfig.py:57 +#: cms_appconfig.py:61 msgid "Template prefix" msgstr "" -#: cms_appconfig.py:58 +#: cms_appconfig.py:62 msgid "Alternative directory to load the blog templates from" msgstr "" -#: cms_appconfig.py:61 +#: cms_appconfig.py:65 msgid "Menu structure" msgstr "" -#: cms_appconfig.py:63 +#: cms_appconfig.py:67 msgid "Structure of the django CMS menu" msgstr "" -#: cms_appconfig.py:66 +#: cms_appconfig.py:70 msgid "Sitemap changefreq" msgstr "" -#: cms_appconfig.py:69 +#: cms_appconfig.py:73 msgid "Changefreq attribute for sitemap items" msgstr "" -#: cms_appconfig.py:72 +#: cms_appconfig.py:76 msgid "Sitemap priority" msgstr "" -#: cms_appconfig.py:74 +#: cms_appconfig.py:78 msgid "Priority attribute for sitemap items" msgstr "" -#: cms_appconfig.py:77 +#: cms_appconfig.py:81 msgid "Object type" msgstr "" -#: cms_appconfig.py:81 +#: cms_appconfig.py:85 msgid "Facebook type" msgstr "" -#: cms_appconfig.py:85 +#: cms_appconfig.py:89 msgid "Facebook application ID" msgstr "" -#: cms_appconfig.py:89 +#: cms_appconfig.py:93 msgid "Facebook profile ID" msgstr "" -#: cms_appconfig.py:93 +#: cms_appconfig.py:97 msgid "Facebook page URL" msgstr "" -#: cms_appconfig.py:97 +#: cms_appconfig.py:101 msgid "Facebook author URL" msgstr "" -#: cms_appconfig.py:101 +#: cms_appconfig.py:105 msgid "Facebook author" msgstr "" -#: cms_appconfig.py:105 +#: cms_appconfig.py:109 msgid "Twitter type" msgstr "" -#: cms_appconfig.py:109 +#: cms_appconfig.py:113 msgid "Twitter site handle" msgstr "" -#: cms_appconfig.py:113 +#: cms_appconfig.py:117 msgid "Twitter author handle" msgstr "" -#: cms_appconfig.py:117 +#: cms_appconfig.py:121 msgid "Google+ type" msgstr "" -#: cms_appconfig.py:121 +#: cms_appconfig.py:125 msgid "Google+ author name" msgstr "" -#: cms_plugins.py:30 cms_plugins.py:49 -msgid "Latest Blog Articles" -msgstr "" - -#: cms_plugins.py:65 -msgid "Author Blog Articles" -msgstr "" - -#: cms_plugins.py:78 templates/djangocms_blog/plugins/tags.html:3 -msgid "Tags" -msgstr "" - -#: cms_plugins.py:94 templates/djangocms_blog/plugins/categories.html:3 -msgid "Categories" -msgstr "" - -#: cms_plugins.py:109 templates/djangocms_blog/plugins/archive.html:3 -#: templates/djangocms_blog/post_list.html:12 -msgid "Archive" -msgstr "" - -#: cms_toolbar.py:21 +#: cms_toolbar.py:22 msgid "Post list" msgstr "" -#: cms_toolbar.py:23 +#: cms_toolbar.py:24 msgid "Add post" msgstr "" -#: cms_toolbar.py:27 +#: cms_toolbar.py:28 msgid "Edit configuration" msgstr "" -#: cms_toolbar.py:31 +#: cms_toolbar.py:32 msgid "Edit Post" msgstr "" @@ -222,7 +210,7 @@ msgstr "" msgid "modified at" msgstr "" -#: models.py:38 models.py:123 models.py:276 +#: models.py:38 models.py:123 models.py:275 msgid "app. config" msgstr "" @@ -332,52 +320,52 @@ msgstr "" msgid "blog articles" msgstr "" -#: models.py:293 -msgid "generic blog plugin" -msgstr "" - -#: models.py:297 models.py:330 +#: models.py:294 models.py:328 msgid "articles" msgstr "" -#: models.py:298 +#: models.py:295 msgid "The number of latests articles to be displayed." msgstr "" -#: models.py:300 +#: models.py:297 msgid "filter by tag" msgstr "" -#: models.py:301 +#: models.py:298 msgid "Show only the blog articles tagged with chosen tags." msgstr "" -#: models.py:304 +#: models.py:301 msgid "filter by category" msgstr "" -#: models.py:305 +#: models.py:302 msgid "Show only the blog articles tagged with chosen categories." msgstr "" -#: models.py:309 +#: models.py:306 #, python-format msgid "%s latest articles by tag" msgstr "" -#: models.py:326 +#: models.py:324 msgid "authors" msgstr "" -#: models.py:331 +#: models.py:329 msgid "The number of author articles to be displayed." msgstr "" -#: models.py:335 +#: models.py:333 #, python-format msgid "%s latest articles by author" msgstr "" +#: models.py:362 +msgid "generic blog plugin" +msgstr "" + #: settings.py:16 msgid "Full date" msgstr "" @@ -438,6 +426,27 @@ msgstr "" msgid "never" msgstr "" +#: settings.py:113 +msgid "Latest Blog Articles" +msgstr "" + +#: settings.py:115 +msgid "Author Blog Articles" +msgstr "" + +#: settings.py:117 templates/djangocms_blog/plugins/tags.html:3 +msgid "Tags" +msgstr "" + +#: settings.py:119 templates/djangocms_blog/plugins/categories.html:3 +msgid "Categories" +msgstr "" + +#: settings.py:121 templates/djangocms_blog/plugins/archive.html:3 +#: templates/djangocms_blog/post_list.html:12 +msgid "Archive" +msgstr "" + #: templates/djangocms_blog/includes/blog_item.html:24 msgid "read more" msgstr "" diff --git a/djangocms_blog/locale/ru/LC_MESSAGES/django.mo b/djangocms_blog/locale/ru/LC_MESSAGES/django.mo index cdee03eef75900b0947912597464460e29f08503..2efd23d0afabfbf44e749957ae6398cc01f7441a 100644 GIT binary patch literal 9681 zcmb7|3yd9CdB;ykOxjID3W3nj0w*ap>&AC?uOErocpV(a4yJZ&>~$U`Jnr5*yF1x? zXRhze^?H+_`aw*nqnHF}AR;AcTB1IX9NSy3z4kg4Ev>{ub3v_IB>JF2s8vC&TA`{@ zAHV;ZnftKU4jJva|2b#Q`Of$Ff8U(hzkAD7pEq24X}?1I=9R`g2R?c=KV1Lz^Xd4% zgE!KDQ=c*XnSOrW4Xy%z4%`K<0Urdl^l9)K@LBM!;8(KodGIRwU(4_>!FSRB7RVOn zUqSxNPx;ZhD-d!Wcmt??mVwK_LGbP1y`a_w;9J0b+4vDq>s|z}2Ty=+2LB@K|1Eee z{U3u`|7teAwm+lzBYse-6|>Uj(Jc zOQ7V=gYxH}gR=MU!S{gw0*-^%u}I^4!MA}2z+vzia5eZHPHS4ea{m~VU1vb)_w8)_uRzK9Cs6Bu0xHh`3rhd%QC|DK8pyclbWyfJqa*t-?&t&)#C|;Zbwcnp+_;pbG zego9{7AT&457d7Dm*E@P>~0jf7QB`5-59eHd;%nt<~%q7ej9uzcq>YN6dVQRhZEp0 zgA3rz;P*hq=YO*2eK(~0zYSc?_`5*)br&c*CqS)x7*t(&E*n1w-bX(Hmx28R>Am1~ zumDbjOTpgeif8Ge*?&yPU)O|{sSmIew_9H z3nV0F$xSJ~6O?{yGTa5q&wD`GwI7r}KMUdl^LyF&E1>lGE+{|z2pj@$BG}@`PEh?B zQ0xB?lwR|o^!`V16?nz3;!|)9C_R1?gxcmgQ0tC^(&uZS^!W~`^*;oaUrR_L+1Uqb z-?xLefa^1S2$a0v2BD7mqYVEH)PCOw<&RfE@$Pz*l)v5qYQLqR)~^K>zil8XVEzD< zey@O6fVw`Af*AoTw3W0`n)0b|q~!O*{~%?x5w@J^4+Biow;{ z{dRCK?Liv!bM;^osQRjyeu#DzZICubQ+z*4Qyo_fb$yIR=pD!20NzK_McSFIwD;3| zny$NP5p4%eH9`3%4y~YxgH@U?@kd-M)7H>*txdskO1#&#nf7to?KI_(@~cGCwSjgm zZCo9$jVW|~mqxZ)ioGbdrAF+Rt6pTsW^Ab$PlgS%_`|p~VTRh%O)(-WnRPmm{FsRPtlen2I1ry$Q!`ov^aoq67nz3ic!-my9wNl**Sl{s2!Io^` zP1{F?K4Ja9K2rRI*;MgkyF;~7Oj`>Y34ORIaxd zj5)gPj>yz8=vyN43qgtXe;4GhLR!psgBmJ6+O6S&&Q~kR8@g&3yP|@TI zrE^WOL82>(fw$Ldn84c?n=ma`Za5q_^-=@njcS7;QlkDu<%VB(b-gn><;_fojY`xt zF%1RzvDXiqJV=XJj;>+^Wv{E>3}SS|yA>>?*t)75OQ%$no)g`QX-2HZa@SSSa4e3( zvR|rF&PpPdnfAOX%$tFVz>Y?!DqPr7DctKdB3??vHjP)g78S&czMWn@Y{Z3a(S%C)KxEz{r3l6ebTR%2K;zE^Mi>d zAuf!1rP{FF*^DBeZ0etk1{=-6<$c?> zY}?dvMR8!LZzF^t)P+&rpu-$p_Qit~3O~4AC9}c1U}X2`=EB;}JZ(DeH42-8GK35! zhV9xhKW^(gY#YtK9aYW%)xzemQHzFc0Ga7VBdc#$(cyNaKUi8E8W}0tWy`E?hi)1v z7VRB&$TFS&`jM6Sqje*zb?a6Ptt+myk3O0%SzlbeoF&C<$;il%9=UnzN7i(fzi)Ya z9Jy?h@40RS33u3)2w1iJ_P+ZIcPj(a=xhzAcs)Pt+2X*OJ{=>I^T|T%Kr)}qCMT0~ z$z1C(+d9xXm>i?cCa2wVn;c7y(_d)q=kDy!yv&I>;g$^bNbNn4=KHmtXdS)OlVoo3 zC(`jUPm<3i3(3n;AIlE5o@i^qUQe3jGs!$R7>Z%%oXK;{)ZI~wJLVXkP0nPN&uQ=! zvQD)2w+?Z4CYiIX#~FAT_bsq&Avtcd4pt+ciH{|SG|3AH!KJMywB`UaPa*$Ua;|km zT4c^`YnOUH6`M-Rr)d6jER-H6P4bl6`9!b$jtU6WZpV_-+J4yf9)#7pLoPXq!cV3_Hr?QmI|hvkVr#_CB}^bB`l_*1Z{1@i@f2CMEY&>kx!_Q8ZFj#ww~#SJGVWS^9Qe zEIdj{ClUQGE=;l%;&e)`%38OrvKAF3LNOGNT~tq_>gyBD8{|U4kcph5IwM*-(nahG z+!53M){*6gGSIH(@}J(pBKUEFq`YbKK9pZZ2@0k zw(Qia9^SiSMOw)eSiGZ5b1_&D+8fKtl9yGmQL`DMDPLKQqpiaxp)M+q+(|)OzQ%UE zQqlSl2ewRo2-i9UWmI%Tf%GWlBeyZ^(|Imkbc?WZJ$N|l`?MCG$-$efQ9Y7FU|2?*}2$0=Myi7Wa<;+#y<%fKT_q^^YQak{fKJ^DC1l|cBT{fX&_j%!mAX72;- zqx{Z4zcOZJ8S35)Sfx{H`W5Pyqmy1MN*v_rG_oHN*|}Rj(ZPoeI3+yptPo{kjyx)6 zbKBW9D_M(3QusQdb$eZ)dm3CNlT!Orso8AS&3h$6dO%C_CwGZ5y7g%(wn(aUpRgby z${CkF`gkGzjqDRC3YkS&sl_GTIU)AWvx|>&u7F#d11k{3;2dCZ1vT?H;b~hz0 zg*6chZJj&=0VWcGg<;Zs37Q@h1W z|9q_YIJ)$#kUEHuh;)TWKi>R+8|jZFB9(XrH(&`@;6L~wKEhS_3~TUJ@O=4F5iSV_ zR^xig4XFL?K>8`lE;1{5uphO9!?*^AkV}5xruE}Eh?Cfd3%DJ(EL)t&*T~p1gj7ie zJ28)4coA3QeGK6fj4-~u2p;^4y69EQ7grcYooPMl3Y$?o?hNcfZT~THNk2E;nO#_3 z5Ni9wxDk)y=e$tFFy(tRPBOmClZoL@-qHb&<2p=YGoD7B`K6$K8g-!Cs5@{EqxdE; zLMLsMo3R7;VKc&A-gAe)QNnL zoY(SaXvGMj?`hJ0o60#62l=|vPUy~QpZZDk{JocS5=>4S-g~;Z3;K7gC3J#ug554p zN)Kxb@ov&TMR!8~5Iyy}-T$W!GR(W2mgvdcMChtC>Go6;@}wH zNbFO$;3c!Ul$Vzv`oa+5;jO*(wSR9Ah`@3;jS&L&cWDKDYjK0TT=57)GsQ1oEs)-65VPIph=wjMJST^|&;QJnrYdZ)t7 z)toakwZB)KH-FZ(n1T9s^H;-W)7uy~ZH, 2015 +# Rustam Mirzaev , 2015 msgid "" msgstr "" "Project-Id-Version: djangocms-blog\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-10-31 13:23+0100\n" -"PO-Revision-Date: 2015-10-31 12:23+0000\n" +"POT-Creation-Date: 2015-12-20 17:14+0100\n" +"PO-Revision-Date: 2015-12-20 16:15+0000\n" "Last-Translator: yakky \n" "Language-Team: Russian (http://www.transifex.com/nephila/djangocms-blog/language/ru/)\n" "MIME-Version: 1.0\n" @@ -21,187 +22,175 @@ msgstr "" #: admin.py:169 admin.py:177 admin.py:185 msgid "You can provide plain strings, Post model attribute or method names" -msgstr "" +msgstr "Вы можете использовать простую строку, атрибут модели статьи или имена методов" #: apps.py:15 msgid "django CMS Blog" -msgstr "" +msgstr "django CMS Блог" -#: cms_app.py:15 cms_plugins.py:64 cms_plugins.py:77 cms_plugins.py:93 -#: cms_plugins.py:108 cms_toolbar.py:18 +#: cms_app.py:15 cms_toolbar.py:19 settings.py:111 msgid "Blog" msgstr "Блог" #: cms_appconfig.py:20 msgid "application title" -msgstr "" +msgstr "название приложения" #: cms_appconfig.py:22 msgid "object name" -msgstr "" +msgstr "название объекта" #: cms_appconfig.py:27 -msgid "untitled" +#| msgid "blog categories" +msgid "blog config" msgstr "" -#: cms_appconfig.py:32 -msgid "Post published by default" +#: cms_appconfig.py:28 +#| msgid "blog categories" +msgid "blog configs" msgstr "" +#: cms_appconfig.py:31 +msgid "untitled" +msgstr "безымянный" + #: cms_appconfig.py:36 -msgid "Permalink structure" -msgstr "" +msgid "Post published by default" +msgstr "Статья опубликованная по умолчанию" -#: cms_appconfig.py:41 -msgid "Use placeholder and plugins for article body" -msgstr "" +#: cms_appconfig.py:40 +msgid "Permalink structure" +msgstr "Строение постоянной ссылки" #: cms_appconfig.py:45 +msgid "Use placeholder and plugins for article body" +msgstr "Используйте местозаполнитель и плагины для тела статьи" + +#: cms_appconfig.py:49 msgid "Use abstract field" -msgstr "" - -#: cms_appconfig.py:49 -msgid "Set author" -msgstr "" - -#: cms_appconfig.py:49 -msgid "Set author by default" -msgstr "" +msgstr "Используйте поле краткого описания" #: cms_appconfig.py:53 -msgid "Paginate size" -msgstr "" +msgid "Set author" +msgstr "Указать автора" -#: cms_appconfig.py:54 -msgid "When paginating list views, how many articles per page?" -msgstr "" +#: cms_appconfig.py:53 +msgid "Set author by default" +msgstr "Указать автора по умолчанию" #: cms_appconfig.py:57 -msgid "Template prefix" -msgstr "" +msgid "Paginate size" +msgstr "Разбить на части" #: cms_appconfig.py:58 -msgid "Alternative directory to load the blog templates from" -msgstr "" +msgid "When paginating list views, how many articles per page?" +msgstr "Сколько статей на страницу вы бы хотели использовать при разбиении её на части." #: cms_appconfig.py:61 +msgid "Template prefix" +msgstr "Префикс шаблона" + +#: cms_appconfig.py:62 +msgid "Alternative directory to load the blog templates from" +msgstr "Альтернативная директория загрузки шаблонов блога" + +#: cms_appconfig.py:65 msgid "Menu structure" -msgstr "" +msgstr "Структура меню" -#: cms_appconfig.py:63 +#: cms_appconfig.py:67 msgid "Structure of the django CMS menu" -msgstr "" +msgstr "Структура меню django CMS " -#: cms_appconfig.py:66 +#: cms_appconfig.py:70 msgid "Sitemap changefreq" -msgstr "" +msgstr "Частота обновления карты сайта" -#: cms_appconfig.py:69 +#: cms_appconfig.py:73 msgid "Changefreq attribute for sitemap items" -msgstr "" +msgstr "Атрибут частоты изменения объектов карты сайта" -#: cms_appconfig.py:72 +#: cms_appconfig.py:76 msgid "Sitemap priority" -msgstr "" +msgstr "Приоритет" -#: cms_appconfig.py:74 +#: cms_appconfig.py:78 msgid "Priority attribute for sitemap items" -msgstr "" - -#: cms_appconfig.py:77 -msgid "Object type" -msgstr "" +msgstr "Приоритет атребута для объектов карты сайта" #: cms_appconfig.py:81 -msgid "Facebook type" -msgstr "" +msgid "Object type" +msgstr "Тип объекта" #: cms_appconfig.py:85 -msgid "Facebook application ID" -msgstr "" +msgid "Facebook type" +msgstr "тип в Facebook" #: cms_appconfig.py:89 -msgid "Facebook profile ID" -msgstr "" +msgid "Facebook application ID" +msgstr "ID приложения на Facebook" #: cms_appconfig.py:93 -msgid "Facebook page URL" -msgstr "" +msgid "Facebook profile ID" +msgstr "ID профиля на Facebook" #: cms_appconfig.py:97 -msgid "Facebook author URL" -msgstr "" +msgid "Facebook page URL" +msgstr "URL страницы на Facebook" #: cms_appconfig.py:101 -msgid "Facebook author" -msgstr "" +msgid "Facebook author URL" +msgstr "URL автора на Facebook " #: cms_appconfig.py:105 -msgid "Twitter type" -msgstr "" +msgid "Facebook author" +msgstr "автор на Facebook " #: cms_appconfig.py:109 -msgid "Twitter site handle" -msgstr "" +msgid "Twitter type" +msgstr "тип на Twitter" #: cms_appconfig.py:113 -msgid "Twitter author handle" -msgstr "" +msgid "Twitter site handle" +msgstr "дескриптор сайта на Twitter" #: cms_appconfig.py:117 -msgid "Google+ type" -msgstr "" +msgid "Twitter author handle" +msgstr "дескриптор автора на Twitter" #: cms_appconfig.py:121 +msgid "Google+ type" +msgstr "тип на Google+" + +#: cms_appconfig.py:125 msgid "Google+ author name" -msgstr "" +msgstr "имя автора на Google+" -#: cms_plugins.py:30 cms_plugins.py:49 -msgid "Latest Blog Articles" -msgstr "Последние статьи блога" - -#: cms_plugins.py:65 -msgid "Author Blog Articles" -msgstr "Автор статей блога" - -#: cms_plugins.py:78 templates/djangocms_blog/plugins/tags.html:3 -msgid "Tags" -msgstr "Метки" - -#: cms_plugins.py:94 templates/djangocms_blog/plugins/categories.html:3 -msgid "Categories" -msgstr "Категории" - -#: cms_plugins.py:109 templates/djangocms_blog/plugins/archive.html:3 -#: templates/djangocms_blog/post_list.html:12 -msgid "Archive" -msgstr "Архив" - -#: cms_toolbar.py:21 +#: cms_toolbar.py:22 msgid "Post list" msgstr "Список статей" -#: cms_toolbar.py:23 +#: cms_toolbar.py:24 msgid "Add post" msgstr "Добавить статью" -#: cms_toolbar.py:27 +#: cms_toolbar.py:28 msgid "Edit configuration" -msgstr "" +msgstr "Редактировать настройки" -#: cms_toolbar.py:31 +#: cms_toolbar.py:32 msgid "Edit Post" msgstr "Редактировать статью" #: cms_wizards.py:47 #, python-brace-format msgid "New {0}" -msgstr "" +msgstr "Новых {0}" #: cms_wizards.py:51 #, python-brace-format msgid "Create a new {0} in {1}" -msgstr "" +msgstr "Создать новых {0} из {1}" #: feeds.py:24 #, python-format @@ -210,7 +199,7 @@ msgstr "Статьи блога с сайта: %(site_name)s" #: menu.py:16 msgid "Blog menu" -msgstr "" +msgstr "Меню блога" #: models.py:34 msgid "parent" @@ -224,9 +213,9 @@ msgstr "время создания" msgid "modified at" msgstr "время изменения" -#: models.py:38 models.py:123 models.py:276 +#: models.py:38 models.py:123 models.py:275 msgid "app. config" -msgstr "" +msgstr "настройки приложения" #: models.py:42 msgid "name" @@ -246,27 +235,27 @@ msgstr "категории блога" #: models.py:91 msgid "author" -msgstr "" +msgstr "автор" #: models.py:94 msgid "created" -msgstr "" +msgstr "создан(о)" #: models.py:95 msgid "last modified" -msgstr "" +msgstr "последние изменения" #: models.py:96 msgid "published since" -msgstr "" +msgstr "опубликовано" #: models.py:98 msgid "published until" -msgstr "" +msgstr "опубликовано до" #: models.py:100 msgid "publish" -msgstr "" +msgstr "опубликовать" #: models.py:101 msgid "category" @@ -274,19 +263,19 @@ msgstr "категория" #: models.py:103 msgid "main image" -msgstr "" +msgstr "главная страница" #: models.py:107 msgid "main image thumbnail" -msgstr "" +msgstr "уменьшенная копия главного изображения" #: models.py:112 msgid "main image full" -msgstr "" +msgstr "Полноразмерное изображение" #: models.py:116 msgid "enable comments on post" -msgstr "" +msgstr "Разрешить комментарии к статье" #: models.py:118 msgid "Site(s)" @@ -300,23 +289,23 @@ msgstr "Выберите сайты на которых будет опубли #: models.py:127 msgid "title" -msgstr "" +msgstr "Заголовок" #: models.py:129 msgid "abstract" -msgstr "" +msgstr "Краткое описание" #: models.py:130 msgid "post meta description" -msgstr "" +msgstr "мета-описание статьи" #: models.py:132 msgid "post meta keywords" -msgstr "" +msgstr "ключевые слова к статье" #: models.py:134 msgid "post meta title" -msgstr "" +msgstr "мета-заголовок к статье" #: models.py:135 msgid "used in title tag and social sharing" @@ -324,7 +313,7 @@ msgstr "используется в метках и обмене в социал #: models.py:138 msgid "text" -msgstr "" +msgstr "текст" #: models.py:175 msgid "blog article" @@ -334,59 +323,59 @@ msgstr "статья блога" msgid "blog articles" msgstr "статьи блога" -#: models.py:293 -msgid "generic blog plugin" -msgstr "" - -#: models.py:297 models.py:330 +#: models.py:294 models.py:328 msgid "articles" -msgstr "" +msgstr "статьи" -#: models.py:298 +#: models.py:295 msgid "The number of latests articles to be displayed." msgstr "Количество последних статей, которые будут показаны." -#: models.py:300 +#: models.py:297 msgid "filter by tag" -msgstr "" +msgstr "фильтровать по тегам" -#: models.py:301 +#: models.py:298 msgid "Show only the blog articles tagged with chosen tags." msgstr "Показывать статьи только с выбранными метками." -#: models.py:304 +#: models.py:301 msgid "filter by category" -msgstr "" +msgstr "фильтровать по категориям" -#: models.py:305 +#: models.py:302 msgid "Show only the blog articles tagged with chosen categories." msgstr "Показывать статьи только из выбранных категорий." -#: models.py:309 +#: models.py:306 #, python-format msgid "%s latest articles by tag" -msgstr "" +msgstr "%s последних статей по тегам" -#: models.py:326 +#: models.py:324 msgid "authors" -msgstr "" +msgstr "авторы" -#: models.py:331 +#: models.py:329 msgid "The number of author articles to be displayed." msgstr "Количество статей автора, которые будут показаны." -#: models.py:335 +#: models.py:333 #, python-format msgid "%s latest articles by author" -msgstr "" +msgstr "%s последних статей по авторам" + +#: models.py:362 +msgid "generic blog plugin" +msgstr "генерируемый плагин блога" #: settings.py:16 msgid "Full date" -msgstr "" +msgstr "Полная дата" #: settings.py:17 msgid "Year / Month" -msgstr "" +msgstr "Год / Месяц" #: settings.py:18 templates/djangocms_blog/post_list.html:14 msgid "Category" @@ -394,51 +383,72 @@ msgstr "Категория" #: settings.py:19 msgid "Just slug" -msgstr "" +msgstr "ЧПУ" #: settings.py:28 msgid "Categories and posts" -msgstr "" +msgstr "Категории и статьи" #: settings.py:29 msgid "Categories only" -msgstr "" +msgstr "Только категории" #: settings.py:30 msgid "Posts only" -msgstr "" +msgstr "Только статьи" #: settings.py:31 msgid "None" -msgstr "" +msgstr "Ничего" #: settings.py:34 msgid "always" -msgstr "" +msgstr "всегда" #: settings.py:35 msgid "hourly" -msgstr "" +msgstr "ежечасно" #: settings.py:36 msgid "daily" -msgstr "" +msgstr "ежедневно" #: settings.py:37 msgid "weekly" -msgstr "" +msgstr "еженедельно" #: settings.py:38 msgid "monthly" -msgstr "" +msgstr "ежемесячно" #: settings.py:39 msgid "yearly" -msgstr "" +msgstr "ежегодно" #: settings.py:40 msgid "never" -msgstr "" +msgstr "никогда" + +#: settings.py:113 +msgid "Latest Blog Articles" +msgstr "Последние статьи блога" + +#: settings.py:115 +msgid "Author Blog Articles" +msgstr "Автор статей блога" + +#: settings.py:117 templates/djangocms_blog/plugins/tags.html:3 +msgid "Tags" +msgstr "Метки" + +#: settings.py:119 templates/djangocms_blog/plugins/categories.html:3 +msgid "Categories" +msgstr "Категории" + +#: settings.py:121 templates/djangocms_blog/plugins/archive.html:3 +#: templates/djangocms_blog/post_list.html:12 +msgid "Archive" +msgstr "Архив" #: templates/djangocms_blog/includes/blog_item.html:24 msgid "read more" @@ -481,7 +491,7 @@ msgstr "Авторы" #: templates/djangocms_blog/plugins/categories.html:15 msgid "No categories found." -msgstr "" +msgstr "Не найдено ни одной категории." #: templates/djangocms_blog/post_list.html:11 msgid "Articles by" diff --git a/djangocms_blog/locale/sl/LC_MESSAGES/django.mo b/djangocms_blog/locale/sl/LC_MESSAGES/django.mo new file mode 100644 index 0000000000000000000000000000000000000000..ea6721374dc7570e18ff66bab9a05c796192eaa1 GIT binary patch literal 6365 zcmb7{Yph&F9l%Ec#VewqA|S$0DBeQ%zWShUDWxqfl=k-4-diZ8SZDXl-JQE<&uq>) zySMiO;gR?t(hn+rBM6C)55`1IG<;Ab(ta>Rjrib`purD_nwUULh%x&6pEG-RZ-FQ$ zJLflNp8xqjW@cZ!@a(TCo``fA>4vkEdKeyi4=egLGAgAU}1Sm(1G^ z-}gZo?@LhHKMG~tkHK@`x1qHEE);wG1d4pWgZ$JhyhMNhgd)!fMv(Fgpp0_`l>XO3 zu~QYI3N-^|zPq5M*;UxPB=zoE?cZaPc9bD`Mz0x0ur4%`M`dzVr-!)qwtg0k1b<51@L9GrnCp~(9O zI0gR#W&Fz!lBv`hC~{9i>30j1`WYzl9EK8?N1@2M2t|JnLebkJ5E0aqq5S($#``f8 z`#ulF-(G?;-#0+ZiX*G(f36Nk7()&_;EM|Mehd!4?~gn7@UA@ zI0YYv7sFq}Pr+BA$aD2YrF^$QS>GI#bsU2-P7TWVStwtI((VB$>-b{eqfq33BJg`q z^z=;Nb5Q*I_fW?BGnDp!g`a@`f}*!ec(GJ92}RyLQ0#gfiaZXAK9`}i`vR19k3pI5 zhfwtN43vH2=TPSR1(b1q3q|f1p~T0lq5khs#(y1(Ue94rvEP+Y+HZg|{&pzqxGnGq z6nW;M=q(Fe3ibEHnCk_6`)E*+UYW z%X5Gv=dtX0yGXZ^ZY1p|$$2lnAWywSVRP~GPm;ETGV!y$Aul)-@@EB(1`?tyIMcDo zZI)}3=B^&wOxKpQ>E=zJzD;Fr8fs#txti=})!Nbi80)frVWxIOk?!~`S3Ba|risa2 z&+5pfwx0WRN#|b2-b6ZYT3w5ML+7^LDMZrqsc)+tX}w7gxFVj~QHZB^O7nhsD9qGO zQ*SA$DqbscXrJh{qnXR?@x-+4IvPs%woSTf7aC~z)Y)t(t4&f0zN*kC@lwALnbgu% z8=crieb2;w+9mp)$@|pq$mRN=EV{_meKPMF-ITTaMC~zkTl2ov*Ycij9P5a2)c(>E ztJgJ+ggVR9Zawd&Rvjp3QU`p0X?oswlW0sz>MINB7tYicP_)jMI#wMtjpF4ng4LN@ z=F6sS6T74}G=s>kV~6lXuG6jY(X^2`Mr7wrH!f>3REjbVrViERI8C0XuGVGfd7m;o zhBO^5$keQjMGPs-L`jQHS8s~#v!-7xY%eY{ruWY4#3xp}OlLNyvtD#)r)G7}Wv&)e zlW0SUxJzHHh*k_d#x(eG>AQpMu-vmUorpc~x4zG6{JOzVi!N{Kdedh%8PX?Xzq784 zmeGj?k7nx%iZ(hyS!%X#Q0?anS)v7#G`!w5JzM(Z98pHf)Le)M`r3JSLd~)Aq}#69 zRJxX{?YlxIDn(h5%ZQ;Ri&v~}UdH+$I^W#>aE3qE@Hd0K=ADfrB}EKZw@n{MOj`s- z+-ijS z_DSAUeF>C_7tK+7h>ete$7X82-+ixI==7s^3v$Zi^xrQFc3(*q%*!pU9Oj zcZ8zY&#R6}5nf67;dr?r#It(pI>lBsC~euLMW065P{Yy=cxBJ|E*0fI(Pt5qN!<>8 zcat0$(Q3pB*~)SeryND9uxg~b868=4@hKr$cw6S{&ctjMCdH@JqO~nnwuH-ogQ=H2 zuCh0(+-}nh7pdyfRP}aN5q}stWII01E7MuSMU|c1Mpl{gRXuWWX0B3f;q4covVZ8=2lay?daH$+3x%U3dd_uFP=|R5@c$ccE4!0A-k3D1dP~jaD-u_A7LOc^In(0G9-p?es!s4^ zKC^8bx3XPGcH3yO7WHl0HmSGk2~CsobBfQ&!RH2j@4fx1jZ{rhwPD@Xkt3B`Bv49C z?)NPYs%5Ju$2N_~%_K1k3F=xn{iJJZoZ9qs0}ozZ+-P~YG1f9EZCu}1Yj6>*0jBDy+tF# zv5@zOM-J>>arfcP)#os4aAj{FJ`$qB^jyv@ZgBUJbtq!4+t#BUA1CV&zHiXgi<6_W z#ofoq!RW9mdX)*)0e9+TFkO*d5mU{%j#SuIZsepji8}p6P5{TgY%dy-BQBBJFn9-N zS~flI5O_s9j5{OR7ZWXTy6FsML>4K_+IWEzKouGa+6s3e*+xxy8A4P{% zw<4qVE^~mpQV3LN3LU3-a+s=tQoH|K_>g6DnYrBE3 zn6`U|U5jv(ZiUH4-J7mW=yk|oL&tG&j2Ve%qY7}h#S=RoZG^BI_&^y<_(Rw@*6Wto zKx`cO6`k8b2kOq)Yu>KQVGbHo!~De+s+EiGaqk6nG;9S}u0K(?Xj>Ra_j2r+IOLGn zD>TbJuFW4awa>?{HE`U*6Im5z4eqmD?YG?f#`Uz#Y+d;*;S%0bJsTxnC1%<6wBh>H zGId9o2Ujh0ph`_RHL$B0%G)x(5?5z_8?{npIJspzz}x&#mc^=w%Lj!+=Gw{rre@l{ z;ZL2!W4y$MbftCa&Q8gNDRn8T>J05aXOx!?(+u}1(O>DHePya%#{RCmX`u!a$sWsp zs6xg@YnXM& zA1T5yJ^dto*dBa`zc|4ZML{cG=rR%^#*mz1!*!(%LkZr@naA+sMioWkKz=BznQBm> zBd_RE>^41Q<<`~0sfr=F5OzF5;@fN~ijAstNw0f-AC$PrxRx04%gD-H3th@|c_kC~ X_U+W3etN+*89K5_#)-;Jhw=UkV8(Lc literal 0 HcmV?d00001 diff --git a/djangocms_blog/locale/sl/LC_MESSAGES/django.po b/djangocms_blog/locale/sl/LC_MESSAGES/django.po new file mode 100644 index 0000000..2b6851c --- /dev/null +++ b/djangocms_blog/locale/sl/LC_MESSAGES/django.po @@ -0,0 +1,535 @@ +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Iacopo Spalletti, 2014 +msgid "" +msgstr "" +"Project-Id-Version: djangocms-blog\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-12-20 17:14+0100\n" +"PO-Revision-Date: 2015-12-20 16:15+0000\n" +"Last-Translator: yakky \n" +"Language-Team: Slovenian (http://www.transifex.com/nephila/djangocms-blog/language/sl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sl\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" +"X-Generator: Lokalize 1.5\n" + +#: admin.py:169 admin.py:177 admin.py:185 +msgid "You can provide plain strings, Post model attribute or method names" +msgstr "" + +#: apps.py:15 +msgid "django CMS Blog" +msgstr "django CMS Blog" + +#: cms_app.py:15 cms_toolbar.py:19 settings.py:111 +msgid "Blog" +msgstr "Blog" + +#: cms_appconfig.py:20 +msgid "application title" +msgstr "naziv aplikacije" + +#: cms_appconfig.py:22 +msgid "object name" +msgstr "ime objekta" + +#: cms_appconfig.py:27 +#| msgid "blog categories" +msgid "blog config" +msgstr "" + +#: cms_appconfig.py:28 +#| msgid "blog categories" +msgid "blog configs" +msgstr "" + +#: cms_appconfig.py:31 +msgid "untitled" +msgstr "nepoimenovano" + +#: cms_appconfig.py:36 +msgid "Post published by default" +msgstr "Objava naj bo samodejno objavljena" + +#: cms_appconfig.py:40 +msgid "Permalink structure" +msgstr "Struktura povezav" + +#: cms_appconfig.py:45 +msgid "Use placeholder and plugins for article body" +msgstr "Za objavo naj bodo uporabljeni vtičniki in označbe mest" + +#: cms_appconfig.py:49 +msgid "Use abstract field" +msgstr "Uporaba abstraktnih polj" + +#: cms_appconfig.py:53 +msgid "Set author" +msgstr "Nastavi avtorja" + +#: cms_appconfig.py:53 +msgid "Set author by default" +msgstr "Avtor naj bo nastavljen samodejno" + +#: cms_appconfig.py:57 +msgid "Paginate size" +msgstr "Število objav na stran" + +#: cms_appconfig.py:58 +msgid "When paginating list views, how many articles per page?" +msgstr "Koliko objav naj bo na eni strani?" + +#: cms_appconfig.py:61 +msgid "Template prefix" +msgstr "Predpona predlog" + +#: cms_appconfig.py:62 +msgid "Alternative directory to load the blog templates from" +msgstr "Alternativni direktorij za nalaganje predlog bloga" + +#: cms_appconfig.py:65 +msgid "Menu structure" +msgstr "Struktura menija" + +#: cms_appconfig.py:67 +msgid "Structure of the django CMS menu" +msgstr "Struktura django CMS menija" + +#: cms_appconfig.py:70 +msgid "Sitemap changefreq" +msgstr "" + +#: cms_appconfig.py:73 +msgid "Changefreq attribute for sitemap items" +msgstr "" + +#: cms_appconfig.py:76 +msgid "Sitemap priority" +msgstr "Sitemap prioriteta" + +#: cms_appconfig.py:78 +msgid "Priority attribute for sitemap items" +msgstr "Prioriteta atributov za elemente sitemapa" + +#: cms_appconfig.py:81 +msgid "Object type" +msgstr "Tip objekta" + +#: cms_appconfig.py:85 +msgid "Facebook type" +msgstr "" + +#: cms_appconfig.py:89 +msgid "Facebook application ID" +msgstr "" + +#: cms_appconfig.py:93 +msgid "Facebook profile ID" +msgstr "" + +#: cms_appconfig.py:97 +msgid "Facebook page URL" +msgstr "" + +#: cms_appconfig.py:101 +msgid "Facebook author URL" +msgstr "" + +#: cms_appconfig.py:105 +msgid "Facebook author" +msgstr "Facebook avtor" + +#: cms_appconfig.py:109 +msgid "Twitter type" +msgstr "" + +#: cms_appconfig.py:113 +msgid "Twitter site handle" +msgstr "" + +#: cms_appconfig.py:117 +msgid "Twitter author handle" +msgstr "" + +#: cms_appconfig.py:121 +msgid "Google+ type" +msgstr "" + +#: cms_appconfig.py:125 +msgid "Google+ author name" +msgstr "" + +#: cms_toolbar.py:22 +msgid "Post list" +msgstr "Seznam objav" + +#: cms_toolbar.py:24 +msgid "Add post" +msgstr "Nova objava" + +#: cms_toolbar.py:28 +msgid "Edit configuration" +msgstr "Uredi nastavitve" + +#: cms_toolbar.py:32 +msgid "Edit Post" +msgstr "Uredi objavo" + +#: cms_wizards.py:47 +#, python-brace-format +msgid "New {0}" +msgstr "Nov {0}" + +#: cms_wizards.py:51 +#, python-brace-format +msgid "Create a new {0} in {1}" +msgstr "Ustvari nov {0} v {1}" + +#: feeds.py:24 +#, python-format +msgid "Blog articles on %(site_name)s" +msgstr "Blog objave na %(site_name)s" + +#: menu.py:16 +msgid "Blog menu" +msgstr "Blog meni" + +#: models.py:34 +msgid "parent" +msgstr "starš" + +#: models.py:35 +msgid "created at" +msgstr "ustvarjeno na" + +#: models.py:36 +msgid "modified at" +msgstr "urejeno na" + +#: models.py:38 models.py:123 models.py:275 +msgid "app. config" +msgstr "" + +#: models.py:42 +msgid "name" +msgstr "ime" + +#: models.py:43 models.py:128 +msgid "slug" +msgstr "" + +#: models.py:50 +msgid "blog category" +msgstr "blog kategorija" + +#: models.py:51 +msgid "blog categories" +msgstr "blog kategorije" + +#: models.py:91 +msgid "author" +msgstr "avtor" + +#: models.py:94 +msgid "created" +msgstr "ustvarjeno" + +#: models.py:95 +msgid "last modified" +msgstr "nazadnje urejeno" + +#: models.py:96 +msgid "published since" +msgstr "objavljeno od" + +#: models.py:98 +msgid "published until" +msgstr "objavljeno do" + +#: models.py:100 +msgid "publish" +msgstr "objavljeno" + +#: models.py:101 +msgid "category" +msgstr "kategorija" + +#: models.py:103 +msgid "main image" +msgstr "glavna slika" + +#: models.py:107 +msgid "main image thumbnail" +msgstr "glavna slika - predogled" + +#: models.py:112 +msgid "main image full" +msgstr "glavna slika - polna" + +#: models.py:116 +msgid "enable comments on post" +msgstr "Omogoči komentarje na objavi" + +#: models.py:118 +msgid "Site(s)" +msgstr "Stran(i)" + +#: models.py:119 +msgid "" +"Select sites in which to show the post. If none is set it will be visible in" +" all the configured sites." +msgstr "Izberi strani na katerih naj bo objava prikazana. Če ni izbrano nič, bo objava prikazana na vseh nastavljenih straneh." + +#: models.py:127 +msgid "title" +msgstr "naziv" + +#: models.py:129 +msgid "abstract" +msgstr "osnutek" + +#: models.py:130 +msgid "post meta description" +msgstr "meta opis objave" + +#: models.py:132 +msgid "post meta keywords" +msgstr "meta ključne besede objave" + +#: models.py:134 +msgid "post meta title" +msgstr "meta naziv objave" + +#: models.py:135 +msgid "used in title tag and social sharing" +msgstr "za uporabo v označbi naslova in deljenju na socialnih omrežjih" + +#: models.py:138 +msgid "text" +msgstr "tekst" + +#: models.py:175 +msgid "blog article" +msgstr "blog objava" + +#: models.py:176 +msgid "blog articles" +msgstr "blog objave" + +#: models.py:294 models.py:328 +msgid "articles" +msgstr "objave" + +#: models.py:295 +msgid "The number of latests articles to be displayed." +msgstr "Število najnovejših objav, ki naj bodo prikazane" + +#: models.py:297 +msgid "filter by tag" +msgstr "filtriraj po oznakah" + +#: models.py:298 +msgid "Show only the blog articles tagged with chosen tags." +msgstr "Prikaži le blog objave označene z izbranimi oznakami" + +#: models.py:301 +msgid "filter by category" +msgstr "filtriraj po kategoriji" + +#: models.py:302 +msgid "Show only the blog articles tagged with chosen categories." +msgstr "Prikaži le blog objave označene z izbranimi kategorijami" + +#: models.py:306 +#, python-format +msgid "%s latest articles by tag" +msgstr "%s najnovejših objav glede na oznako" + +#: models.py:324 +msgid "authors" +msgstr "avtorji" + +#: models.py:329 +msgid "The number of author articles to be displayed." +msgstr "Število avtorjevih objav, ki naj bodo prikazane" + +#: models.py:333 +#, python-format +msgid "%s latest articles by author" +msgstr "%s najnovejših objav glede na avtorja" + +#: models.py:362 +msgid "generic blog plugin" +msgstr "generični blog vtičnik" + +#: settings.py:16 +msgid "Full date" +msgstr "Datum (poln)" + +#: settings.py:17 +msgid "Year / Month" +msgstr "Leto / Mesec" + +#: settings.py:18 templates/djangocms_blog/post_list.html:14 +msgid "Category" +msgstr "Kategorija" + +#: settings.py:19 +msgid "Just slug" +msgstr "" + +#: settings.py:28 +msgid "Categories and posts" +msgstr "Kategorije in objave" + +#: settings.py:29 +msgid "Categories only" +msgstr "Samo kategorije" + +#: settings.py:30 +msgid "Posts only" +msgstr "Samo objave" + +#: settings.py:31 +msgid "None" +msgstr "" + +#: settings.py:34 +msgid "always" +msgstr "vedno" + +#: settings.py:35 +msgid "hourly" +msgstr "vsako uro" + +#: settings.py:36 +msgid "daily" +msgstr "dnevno" + +#: settings.py:37 +msgid "weekly" +msgstr "tedensko" + +#: settings.py:38 +msgid "monthly" +msgstr "mesečno" + +#: settings.py:39 +msgid "yearly" +msgstr "letno" + +#: settings.py:40 +msgid "never" +msgstr "nikoli" + +#: settings.py:113 +msgid "Latest Blog Articles" +msgstr "Najnovejše blog objave" + +#: settings.py:115 +msgid "Author Blog Articles" +msgstr "Avtorjeve blog objave" + +#: settings.py:117 templates/djangocms_blog/plugins/tags.html:3 +msgid "Tags" +msgstr "Oznake" + +#: settings.py:119 templates/djangocms_blog/plugins/categories.html:3 +msgid "Categories" +msgstr "Kategorije" + +#: settings.py:121 templates/djangocms_blog/plugins/archive.html:3 +#: templates/djangocms_blog/post_list.html:12 +msgid "Archive" +msgstr "Arhiv" + +#: templates/djangocms_blog/includes/blog_item.html:24 +msgid "read more" +msgstr "preberi več" + +#: templates/djangocms_blog/includes/blog_meta.html:6 +msgid "by" +msgstr "" + +#: templates/djangocms_blog/plugins/archive.html:17 +#: templates/djangocms_blog/plugins/authors.html:10 +#: templates/djangocms_blog/plugins/categories.html:10 +#: templates/djangocms_blog/plugins/tags.html:10 +#, python-format +msgid "1 article" +msgid_plural "%(articles)s articles" +msgstr[0] "%(articles)s objava" +msgstr[1] "%(articles)s objave" +msgstr[2] "%(articles)s objave" +msgstr[3] "%(articles)s objave" + +#: templates/djangocms_blog/plugins/archive.html:18 +#: templates/djangocms_blog/plugins/authors.html:11 +#: templates/djangocms_blog/plugins/categories.html:11 +#: templates/djangocms_blog/plugins/tags.html:11 +msgid "0 articles" +msgstr "0 objav" + +#: templates/djangocms_blog/plugins/archive.html:26 +#: templates/djangocms_blog/plugins/authors.html:15 +#: templates/djangocms_blog/plugins/latest_entries.html:7 +#: templates/djangocms_blog/plugins/tags.html:15 +#: templates/djangocms_blog/post_list.html:21 +msgid "No article found." +msgstr "Nič objav" + +#: templates/djangocms_blog/plugins/authors.html:3 +msgid "Authors" +msgstr "Avtorji" + +#: templates/djangocms_blog/plugins/categories.html:15 +msgid "No categories found." +msgstr "Nič kategorij" + +#: templates/djangocms_blog/post_list.html:11 +msgid "Articles by" +msgstr "Objave avtorja" + +#: templates/djangocms_blog/post_list.html:13 +msgid "Tag" +msgstr "Oznaka" + +#: templates/djangocms_blog/post_list.html:24 +msgid "Back" +msgstr "Nazaj" + +#: templates/djangocms_blog/post_list.html:29 +msgid "previous" +msgstr "prejšnji/a" + +#: templates/djangocms_blog/post_list.html:32 +msgid "Page" +msgstr "Stran" + +#: templates/djangocms_blog/post_list.html:32 +msgid "of" +msgstr "od" + +#: templates/djangocms_blog/post_list.html:35 +msgid "next" +msgstr "naslednji" + +#~ msgid "Article" +#~ msgstr "Articles" + +#~ msgid "Text" +#~ msgstr "Text" + +#~ msgid "blog post" +#~ msgstr "blog post" + +#~ msgid "Entries by" +#~ msgstr "Entries by" + +#~ msgid "No entry found." +#~ msgstr "No entry found." diff --git a/djangocms_blog/locale/tr/LC_MESSAGES/django.mo b/djangocms_blog/locale/tr/LC_MESSAGES/django.mo index 9860fb90716e70c44b4f9460408d3d8d65ee08e3..8a0db532b830704dab5cb5bdf7f21618096e63fb 100644 GIT binary patch delta 38 ocmbO)K3{ypB{nW2T_XbpLvt%blgW43i}, 2015 msgid "" msgstr "" "Project-Id-Version: djangocms-blog\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-10-31 13:23+0100\n" -"PO-Revision-Date: 2015-10-31 12:23+0000\n" +"POT-Creation-Date: 2015-12-20 17:14+0100\n" +"PO-Revision-Date: 2015-12-20 16:15+0000\n" "Last-Translator: yakky \n" "Language-Team: Turkish (http://www.transifex.com/nephila/djangocms-blog/language/tr/)\n" "MIME-Version: 1.0\n" @@ -26,8 +26,7 @@ msgstr "" msgid "django CMS Blog" msgstr "" -#: cms_app.py:15 cms_plugins.py:64 cms_plugins.py:77 cms_plugins.py:93 -#: cms_plugins.py:108 cms_toolbar.py:18 +#: cms_app.py:15 cms_toolbar.py:19 settings.py:111 msgid "Blog" msgstr "Blog" @@ -40,155 +39,144 @@ msgid "object name" msgstr "" #: cms_appconfig.py:27 +#| msgid "blog categories" +msgid "blog config" +msgstr "" + +#: cms_appconfig.py:28 +#| msgid "blog categories" +msgid "blog configs" +msgstr "" + +#: cms_appconfig.py:31 msgid "untitled" msgstr "" -#: cms_appconfig.py:32 +#: cms_appconfig.py:36 msgid "Post published by default" msgstr "" -#: cms_appconfig.py:36 +#: cms_appconfig.py:40 msgid "Permalink structure" msgstr "" -#: cms_appconfig.py:41 +#: cms_appconfig.py:45 msgid "Use placeholder and plugins for article body" msgstr "" -#: cms_appconfig.py:45 +#: cms_appconfig.py:49 msgid "Use abstract field" msgstr "" -#: cms_appconfig.py:49 +#: cms_appconfig.py:53 msgid "Set author" msgstr "" -#: cms_appconfig.py:49 +#: cms_appconfig.py:53 msgid "Set author by default" msgstr "" -#: cms_appconfig.py:53 +#: cms_appconfig.py:57 msgid "Paginate size" msgstr "" -#: cms_appconfig.py:54 +#: cms_appconfig.py:58 msgid "When paginating list views, how many articles per page?" msgstr "" -#: cms_appconfig.py:57 +#: cms_appconfig.py:61 msgid "Template prefix" msgstr "" -#: cms_appconfig.py:58 +#: cms_appconfig.py:62 msgid "Alternative directory to load the blog templates from" msgstr "" -#: cms_appconfig.py:61 +#: cms_appconfig.py:65 msgid "Menu structure" msgstr "" -#: cms_appconfig.py:63 +#: cms_appconfig.py:67 msgid "Structure of the django CMS menu" msgstr "" -#: cms_appconfig.py:66 +#: cms_appconfig.py:70 msgid "Sitemap changefreq" msgstr "" -#: cms_appconfig.py:69 +#: cms_appconfig.py:73 msgid "Changefreq attribute for sitemap items" msgstr "" -#: cms_appconfig.py:72 +#: cms_appconfig.py:76 msgid "Sitemap priority" msgstr "" -#: cms_appconfig.py:74 +#: cms_appconfig.py:78 msgid "Priority attribute for sitemap items" msgstr "" -#: cms_appconfig.py:77 +#: cms_appconfig.py:81 msgid "Object type" msgstr "" -#: cms_appconfig.py:81 +#: cms_appconfig.py:85 msgid "Facebook type" msgstr "" -#: cms_appconfig.py:85 +#: cms_appconfig.py:89 msgid "Facebook application ID" msgstr "" -#: cms_appconfig.py:89 +#: cms_appconfig.py:93 msgid "Facebook profile ID" msgstr "" -#: cms_appconfig.py:93 +#: cms_appconfig.py:97 msgid "Facebook page URL" msgstr "" -#: cms_appconfig.py:97 +#: cms_appconfig.py:101 msgid "Facebook author URL" msgstr "" -#: cms_appconfig.py:101 +#: cms_appconfig.py:105 msgid "Facebook author" msgstr "" -#: cms_appconfig.py:105 +#: cms_appconfig.py:109 msgid "Twitter type" msgstr "" -#: cms_appconfig.py:109 +#: cms_appconfig.py:113 msgid "Twitter site handle" msgstr "" -#: cms_appconfig.py:113 +#: cms_appconfig.py:117 msgid "Twitter author handle" msgstr "" -#: cms_appconfig.py:117 +#: cms_appconfig.py:121 msgid "Google+ type" msgstr "" -#: cms_appconfig.py:121 +#: cms_appconfig.py:125 msgid "Google+ author name" msgstr "" -#: cms_plugins.py:30 cms_plugins.py:49 -msgid "Latest Blog Articles" -msgstr "Blog'un son makaleleri" - -#: cms_plugins.py:65 -msgid "Author Blog Articles" -msgstr "Blog'un makale yazarı" - -#: cms_plugins.py:78 templates/djangocms_blog/plugins/tags.html:3 -msgid "Tags" -msgstr "Etiketler" - -#: cms_plugins.py:94 templates/djangocms_blog/plugins/categories.html:3 -msgid "Categories" -msgstr "Kategoriler" - -#: cms_plugins.py:109 templates/djangocms_blog/plugins/archive.html:3 -#: templates/djangocms_blog/post_list.html:12 -msgid "Archive" -msgstr "Arşiv" - -#: cms_toolbar.py:21 +#: cms_toolbar.py:22 msgid "Post list" msgstr "Makale listesi" -#: cms_toolbar.py:23 +#: cms_toolbar.py:24 msgid "Add post" msgstr "Makale ekle" -#: cms_toolbar.py:27 +#: cms_toolbar.py:28 msgid "Edit configuration" msgstr "" -#: cms_toolbar.py:31 +#: cms_toolbar.py:32 msgid "Edit Post" msgstr "Makaleyi düzenle" @@ -223,7 +211,7 @@ msgstr "oluşturma tarihi" msgid "modified at" msgstr "düzenleme tarihi" -#: models.py:38 models.py:123 models.py:276 +#: models.py:38 models.py:123 models.py:275 msgid "app. config" msgstr "" @@ -333,52 +321,52 @@ msgstr "blog makalesi" msgid "blog articles" msgstr "blog makaleleri" -#: models.py:293 -msgid "generic blog plugin" -msgstr "" - -#: models.py:297 models.py:330 +#: models.py:294 models.py:328 msgid "articles" msgstr "" -#: models.py:298 +#: models.py:295 msgid "The number of latests articles to be displayed." msgstr "Ğörütülenecek olan makale sayısı" -#: models.py:300 +#: models.py:297 msgid "filter by tag" msgstr "" -#: models.py:301 +#: models.py:298 msgid "Show only the blog articles tagged with chosen tags." msgstr "Sadece seçili etiketlerle işaretlenmiş makaleleri göster." -#: models.py:304 +#: models.py:301 msgid "filter by category" msgstr "" -#: models.py:305 +#: models.py:302 msgid "Show only the blog articles tagged with chosen categories." msgstr "Sadece seçili kategorilerde bulunan makaleleri ğöster" -#: models.py:309 +#: models.py:306 #, python-format msgid "%s latest articles by tag" msgstr "" -#: models.py:326 +#: models.py:324 msgid "authors" msgstr "" -#: models.py:331 +#: models.py:329 msgid "The number of author articles to be displayed." msgstr "İlgili yazarın gösterilecek olan makale sayısı." -#: models.py:335 +#: models.py:333 #, python-format msgid "%s latest articles by author" msgstr "" +#: models.py:362 +msgid "generic blog plugin" +msgstr "" + #: settings.py:16 msgid "Full date" msgstr "" @@ -439,6 +427,27 @@ msgstr "" msgid "never" msgstr "" +#: settings.py:113 +msgid "Latest Blog Articles" +msgstr "Blog'un son makaleleri" + +#: settings.py:115 +msgid "Author Blog Articles" +msgstr "Blog'un makale yazarı" + +#: settings.py:117 templates/djangocms_blog/plugins/tags.html:3 +msgid "Tags" +msgstr "Etiketler" + +#: settings.py:119 templates/djangocms_blog/plugins/categories.html:3 +msgid "Categories" +msgstr "Kategoriler" + +#: settings.py:121 templates/djangocms_blog/plugins/archive.html:3 +#: templates/djangocms_blog/post_list.html:12 +msgid "Archive" +msgstr "Arşiv" + #: templates/djangocms_blog/includes/blog_item.html:24 msgid "read more" msgstr "devamını oku" diff --git a/djangocms_blog/migrations/0012_auto_20151220_1734.py b/djangocms_blog/migrations/0012_auto_20151220_1734.py new file mode 100644 index 0000000..1d469fd --- /dev/null +++ b/djangocms_blog/migrations/0012_auto_20151220_1734.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('djangocms_blog', '0011_auto_20151024_1809'), + ] + + operations = [ + migrations.AlterModelOptions( + name='blogconfig', + options={'verbose_name': 'blog config', 'verbose_name_plural': 'blog configs'}, + ), + ] From 3fbb7218dee131dd09e4c43627550745f6cb436a Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sun, 20 Dec 2015 19:23:42 +0100 Subject: [PATCH 07/69] Make django CMS 3.2 tests blocking --- .travis.yml | 24 ------------------------ tox.ini | 12 +++++------- 2 files changed, 5 insertions(+), 31 deletions(-) diff --git a/.travis.yml b/.travis.yml index 44158b3..37941a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -84,27 +84,3 @@ matrix: env: DJANGO='django17' CMS='cms31' - python: 3.5 env: DJANGO='django17' CMS='cms32' - - allow_failures: - - python: 2.6 - env: DJANGO='django16' CMS='cms32' - - python: 2.7 - env: DJANGO='django16' CMS='cms32' - - python: 2.7 - env: DJANGO='django17' CMS='cms32' - - python: 2.7 - env: DJANGO='django18' CMS='cms32' - - python: 3.3 - env: DJANGO='django16' CMS='cms32' - - python: 3.3 - env: DJANGO='django17' CMS='cms32' - - python: 3.3 - env: DJANGO='django18' CMS='cms32' - - python: 3.4 - env: DJANGO='django16' CMS='cms32' - - python: 3.4 - env: DJANGO='django17' CMS='cms32' - - python: 3.4 - env: DJANGO='django18' CMS='cms32' - - python: 3.5 - env: DJANGO='django18' CMS='cms32' diff --git a/tox.ini b/tox.ini index b96713b..d468c22 100644 --- a/tox.ini +++ b/tox.ini @@ -7,15 +7,13 @@ deps = -r{toxinidir}/requirements-test.txt django16: Django>=1.6,<1.7 django17: Django>=1.7,<1.8 - django18: Django>=1.7,<1.9 - django18: https://github.com/stefanfoulis/django-filer/archive/develop.zip - django18: https://github.com/stefanfoulis/cmsplugin-filer/archive/develop.zip - django19: Django==1.9a1 - django19: https://github.com/stefanfoulis/django-filer/archive/develop.zip - django19: https://github.com/stefanfoulis/cmsplugin-filer/archive/develop.zip + django18: Django>=1.8,<1.9 + django19: Django>=1.9,<1.10 + django19: https://github.com/divio/django-filer/archive/develop.zip + django19: https://github.com/divio/cmsplugin-filer/archive/develop.zip cms30: https://github.com/divio/django-cms/archive/support/3.0.x.zip cms31: https://github.com/divio/django-cms/archive/support/3.1.x.zip - cms32: https://github.com/divio/django-cms/archive/develop.zip + cms32: https://github.com/divio/django-cms/archive/release/3.2.x.zip https://github.com/nephila/django-meta-mixin/archive/master.zip https://github.com/nephila/djangocms-helper/archive/develop.zip py26: unittest2 From 49a6b5096cfe1e8ef6b211f4692cdc3964cad7ad Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Mon, 21 Dec 2015 06:56:21 +0100 Subject: [PATCH 08/69] Pin django-mptt version in tests --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index d468c22..92c1675 100644 --- a/tox.ini +++ b/tox.ini @@ -18,6 +18,7 @@ deps = https://github.com/nephila/djangocms-helper/archive/develop.zip py26: unittest2 django-parler<1.5 + django-mptt<0.8 https://github.com/aldryn/aldryn-apphooks-config/archive/master.zip https://github.com/nephila/djangocms-apphook-setup/archive/master.zip From acbec532a10c485972f457af0b0cf5eccd235afc Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Tue, 22 Dec 2015 06:06:50 +0100 Subject: [PATCH 09/69] Update history --- HISTORY.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 4203381..9721b4f 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,11 +3,13 @@ History ------- -0.6.3 (XXXX-XX-XX) +0.6.3 (2015-12-22) ++++++++++++++++++ +* Add BLOG_ADMIN_POST_FIELDSET_FILTER to filter admin fieldsets * Ensure correct creation of full URL for canonical urls * Move constants to settings +* Fix error when no config is found 0.6.2 (2015-11-16) ++++++++++++++++++ From ccab15c7732b15de5140ff413020cf1b30057cd0 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Tue, 22 Dec 2015 06:07:19 +0100 Subject: [PATCH 10/69] Bump version --- djangocms_blog/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/djangocms_blog/__init__.py b/djangocms_blog/__init__.py index dee86ff..6df5a60 100644 --- a/djangocms_blog/__init__.py +++ b/djangocms_blog/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- __author__ = 'Iacopo Spalletti' __email__ = 'i.spalletti@nephila.it' -__version__ = '0.6.2.post1' +__version__ = '0.6.3' default_app_config = 'djangocms_blog.apps.BlogAppConfig' From 93437e7262a75fd97fe427956e26d7c6df0fb00a Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Tue, 22 Dec 2015 06:25:34 +0100 Subject: [PATCH 11/69] Bump development version --- djangocms_blog/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/djangocms_blog/__init__.py b/djangocms_blog/__init__.py index 6df5a60..0519514 100644 --- a/djangocms_blog/__init__.py +++ b/djangocms_blog/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- __author__ = 'Iacopo Spalletti' __email__ = 'i.spalletti@nephila.it' -__version__ = '0.6.3' +__version__ = '0.6.3.post1' default_app_config = 'djangocms_blog.apps.BlogAppConfig' From 65c009bf38442a7ef9c6efa4e9c5dd8d99a7330c Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Wed, 23 Dec 2015 11:51:00 +0100 Subject: [PATCH 12/69] Fix README --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index cfcacbb..89815ee 100644 --- a/README.rst +++ b/README.rst @@ -98,7 +98,7 @@ Add ``djangocms_blog`` and its dependencies to INSTALLED_APPS:: ... ] -If you installed the **admin-enhancer** variant, add ``admin_enhancer`` to ``INSTALLED_APPS:: +If you installed the **admin-enhancer** variant, add ``admin_enhancer`` to ``INSTALLED_APPS``:: INSTALLED_APPS = [ ... From 2454f0e46b516e69b5b0674b6136581fdfe72cfd Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Wed, 23 Dec 2015 12:03:15 +0100 Subject: [PATCH 13/69] Promote to stable --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 00e19ca..8f92519 100755 --- a/setup.py +++ b/setup.py @@ -51,7 +51,7 @@ setup( }, classifiers=[ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', From c3f180cfc17bb37c29f379c62502eff980512a0c Mon Sep 17 00:00:00 2001 From: Carlo Ascani Date: Mon, 4 Jan 2016 12:14:18 +0100 Subject: [PATCH 14/69] I suppose this is an old bootstrap class --- djangocms_blog/templates/djangocms_blog/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/djangocms_blog/templates/djangocms_blog/base.html b/djangocms_blog/templates/djangocms_blog/base.html index 94dff07..cf88d78 100644 --- a/djangocms_blog/templates/djangocms_blog/base.html +++ b/djangocms_blog/templates/djangocms_blog/base.html @@ -7,7 +7,7 @@ {% endblock meta %} {% block content %} -
+
{% block content_blog %}{% endblock %}
{% endblock content %} From cf6ab069be09742cfa0f740f56aebedd3d3b6f61 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Mon, 18 Jan 2016 20:07:25 +0100 Subject: [PATCH 15/69] Update README --- README.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.rst b/README.rst index 89815ee..7522a22 100644 --- a/README.rst +++ b/README.rst @@ -48,6 +48,9 @@ Supported django CMS versions: works ok for your project before upgrading, as this might delete some relevant data. +.. warning:: When upgrading to version 0.6, check that every post as an attached + category, or select a menu without categories. + .. warning:: Starting from version 0.5, this package does not declare dependency on South anymore; please install it separately if using this application on Django 1.6. @@ -88,6 +91,7 @@ Add ``djangocms_blog`` and its dependencies to INSTALLED_APPS:: ... 'filer', 'easy_thumbnails', + 'aldryn_apphooks_config', 'cmsplugin_filer_image', 'parler', 'taggit', From d35af9de80c1654930d84e07d909c806b9c6eb16 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Mon, 18 Jan 2016 20:08:25 +0100 Subject: [PATCH 16/69] Add note regarding broken tags in 0.5- --- README.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.rst b/README.rst index 7522a22..bf6c780 100644 --- a/README.rst +++ b/README.rst @@ -47,6 +47,8 @@ Supported django CMS versions: A datamigration is in place to migrate the data, but check that works ok for your project before upgrading, as this might delete some relevant data. + Some plugins have a broken tag management prior to 0.6, in case + you have issues with tags, upgrade to latest version to have it fixed. .. warning:: When upgrading to version 0.6, check that every post as an attached category, or select a menu without categories. From cc943450e263df3bf00249b1a7fa654b9b81a9c7 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Mon, 18 Jan 2016 23:48:43 +0100 Subject: [PATCH 17/69] fix code style --- cms_helper.py | 5 +++-- djangocms_blog/managers.py | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/cms_helper.py b/cms_helper.py index 0a95a18..40ac322 100755 --- a/cms_helper.py +++ b/cms_helper.py @@ -4,7 +4,8 @@ from __future__ import absolute_import, print_function, unicode_literals from tempfile import mkdtemp -gettext = lambda s: s + +def gettext(s): return s HELPER_SETTINGS = dict( ROOT_URLCONF='tests.test_utils.urls', @@ -91,7 +92,7 @@ HELPER_SETTINGS = dict( ), FILE_UPLOAD_TEMP_DIR=mkdtemp(), SITE_ID=1, - HAYSTACK_CONNECTIONS = { + HAYSTACK_CONNECTIONS={ "default": {} } ) diff --git a/djangocms_blog/managers.py b/djangocms_blog/managers.py index 644fbc6..ecd1900 100644 --- a/djangocms_blog/managers.py +++ b/djangocms_blog/managers.py @@ -99,8 +99,8 @@ class GenericDateQuerySet(AppHookConfigTranslatableQueryset): queryset = self.on_site() if self.end_date_field: qfilter = ( - models.Q(**{'%s__gte' % self.end_date_field: now()}) - | models.Q(**{'%s__isnull' % self.end_date_field: True}) + models.Q(**{'%s__gte' % self.end_date_field: now()}) | + models.Q(**{'%s__isnull' % self.end_date_field: True}) ) queryset = queryset.filter(qfilter) return queryset.filter(**{self.publish_field: True}) @@ -109,8 +109,8 @@ class GenericDateQuerySet(AppHookConfigTranslatableQueryset): queryset = self.on_site() if self.end_date_field: qfilter = ( - models.Q(**{'%s__lte' % self.end_date_field: now()}) - | models.Q(**{'%s__isnull' % self.end_date_field: False}) + models.Q(**{'%s__lte' % self.end_date_field: now()}) | + models.Q(**{'%s__isnull' % self.end_date_field: False}) ) queryset = queryset.filter(qfilter) return queryset.filter(**{self.publish_field: True}) From 909b60813dfbf33b43deff11c626e7d1697f31c8 Mon Sep 17 00:00:00 2001 From: Olivier Tabone Date: Wed, 20 Jan 2016 19:08:32 +0100 Subject: [PATCH 18/69] translate app in french --- .../locale/fr/LC_MESSAGES/django.mo | Bin 0 -> 7611 bytes .../locale/fr/LC_MESSAGES/django.po | 541 ++++++++++++++++++ 2 files changed, 541 insertions(+) create mode 100644 djangocms_blog/locale/fr/LC_MESSAGES/django.mo create mode 100644 djangocms_blog/locale/fr/LC_MESSAGES/django.po diff --git a/djangocms_blog/locale/fr/LC_MESSAGES/django.mo b/djangocms_blog/locale/fr/LC_MESSAGES/django.mo new file mode 100644 index 0000000000000000000000000000000000000000..baa0c014f72d034298dcfc8d7decde2d1e2758d3 GIT binary patch literal 7611 zcmbW5eQYIHd4~@)OM@Fe+Xg~tIM8m`ZF0T#=3^6Ymc+Z+O&sivvAr8o2+7<#=lag> z+?l)cVXs4Is0u=&P$W>QrfL+bRuHT3M+>T|Mzn}q1Zq=>D4sL=1!=Ks5&s*Si@KU%6Z-DQG8v052OYo22ufWgL{ZGP6xE|O1I=qVOe}XJwo`d|E z|KUgDUdAM^ftN$Ab2Ypg9)NFvr=i9r@b&O~-T!+~GW-I39sF8-{V(uUT>l5u z_!sK_J(n57pSgk`t$#IqH9QQpue+e;S*h=bQ2W_}OksYzzWylG{GWhY|1qd_{sKym zPeSeUTktpFzrjA-!yxs?@K@m`oP!^S*Tb(v$?+qo{q8}y*TOeK3-?1zXzqfN>m-yO zR^c@4!2|G`m&HI1wT6h_Q55b!uOPX`=7ABHP8E?^wWoX;5n#yHlh6C zBT(``4zwT@}Q&8(Z4K@Csq4yW4_4crc zco}^7W$YCyE;cOkB6o~!#`fby5uAhhOtGt{^nq2#&~@`zch@1KFv=ZB!4`zX}D{uo{f{{(9N zFG1PkY4}F?ER^1!hx_4=;K$(G5nghC5xx~Z32%enf%EVx21~yWK+QAYhg;@%pzQM~ zRJ{HblpKEp`7?jV&kX!F)OxREbK1vsQ1UH6?fX9XCU^$k3O@|*ghfi zM0CHVJ8PTIR^BU(X|o}|;s z1Gn>f>%es4#@jd_(i9^{XgAPwB(&0>Rr;4tyuH4bf5~TLpUFe-pEESs`8wL2H2LN` zXw9+MoYZ^|lz-@0qHWOLs|$`BX}8lZr71SwMUzdZX76xKS+jXxGzp9ID`b?qGd>96mss zquoR!L`*=_aT`s3*{A6^TA}^jo7*@jTwd59E23WPa@*aqL0Jsa%v}6t5v-e;oyW~= zb87bPYv$OWH=Vhe4?{aj^TN!>h0Btlh&G%Jqs;Y+G~2R8YU4BrZ831R8>j2GaKn)o z$@a5!Xy&utfDv#wgJN+PuihUQuSwoUFELPNt0sP)wPG)9PV2wZhxZ#F@LhXYdN^*H}h!!%u|A zIQ01-S1ua{ag>~$SVr2jafAx}*{JMtF>s;0ICTA>jH^32_Q!I|S%jSnJp3ihwd!Jt zAsgm0)#f1T4dkf#Al>wiDu14~3w@iUiL+5|b5~$%yBVRwuCp6a9(7SNg9Ccx+l_G% z%}+dSRvA+VT6;Pv_o|kY*lln$0cHupb*9>kih=D7(%dBzN@eb!Z78$l3}VCk^8KE2 z-rkOP?{tl7{h8Iq&^GOR@xn8NLTZmKtyVF$MwX!EX048AJIY)?I&aocMp6#DF4NFT z0ga2~(lYuBqnsSDk5{>>%`O*t9+i-1nu*y$7(268_e%Blf((u-!D=GWQIy0MRCQjgocmlDL7}%&)bw#V|;4 zx+aH>m`E}Yn`yToNt z&-#5-#xjGn%vd81$P_3q!n&au1}HWfD#^5`woeY6ye#F)4Z zmzl(!FHBmcFW;T^%_zta-Y8edLIL?G?`6@*XZN=EtlQd5voN1{urdwtvJs^vH>#x8 z&}WdO=O(Vpq(DZr8?r-^Z;qRqLNZlT=|0vDO_?*Ao%>5A5%1M`+KYmi^cKj`%%*c^ z+1?he36`@|S-G-TyuIq0t#8Ml zCS{SpG8>lmTuBa+HrBC)ipI8Tuj$1Rp?}LBni#uQ2 zaY6oJS$53MEzXgRw|Pw=eBcG)bvbS3&!oto*)pLnC^uYC`eHA{JAApfR3)FRD*1M< zn4&2TUb^zDw9^)MD2*!pg7OYuzo6&E3O>cBQtT)mKk?I4eLIF=?>(QE8zr~J06o5< zKH2V{!n}t@>X(WwGH#8xt6tV`O}6WfQSf;M;~h$@lyOSdC(~gUzYOIwm1D@CXxwYX zz<*UKx}>TKFQ^a4+kQ+q-ljg}yQFrora0s_hJ7hhQ@W`_B*!G~LGS)mt>`UHG$=X< z)_$M5QSs3VJ8f4Z0#^$0rAWdpeSGCR6OOm9ogBcOEZC_h{Q`srA8o{(Ulg~i^1$i{ zv*_hkFX(%BZ?q98cO^*@6Z&atJu1!Q6ZT;K@pjCdexJBIpK?E8f^%iWtGb$%>~rA^ z6D20vZ9bf;AX?RzQZU+WgEqJ(Y+JjSZEFVAnN_X1>`P4CLm@|wXtI)7q~`oF&(V%2 zvX3%cW3!9+S#Edye&Rt2)St89XIz{z1DTr)qXT8D2hL`}nfA zn)xJA-aA0K8s+A+#vsWC<401C-;ehqW=&X6aTKVe9zT(3UEOQGyr}9*-%(YsdYa^s zhT|vLmnz-1lEvdmt=aBcc5R_hBB(9c7PcyB^Gs66|~;as;W^)^K@-lvy@V0^hjO#OFXm|$$egY67SIC?T{>471|CVREYc6 z!>B~y=JHHQ#z&6vr%kM)NolJjs@gJ~4^S;v|DLY@JFt_byeNwBI&EQ5EJumsgWM;c coND4c@k*gyo;L&64bx%3#}ktVNg_@DKOUI_6#xJL literal 0 HcmV?d00001 diff --git a/djangocms_blog/locale/fr/LC_MESSAGES/django.po b/djangocms_blog/locale/fr/LC_MESSAGES/django.po new file mode 100644 index 0000000..1ff3d1e --- /dev/null +++ b/djangocms_blog/locale/fr/LC_MESSAGES/django.po @@ -0,0 +1,541 @@ +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Iacopo Spalletti, 2014. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-12-20 17:14+0100\n" +"PO-Revision-Date: 2016-01-20 19:07+0100\n" +"Last-Translator: Olivier Tabone \n" +"Language-Team: FR <>\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 1.5.7\n" + +#: admin.py:169 admin.py:177 admin.py:185 +msgid "You can provide plain strings, Post model attribute or method names" +msgstr "" +"Vous pouvez préciser des chaines de caractères, des attributs ou des " +"methodes du modèle Post" + +#: apps.py:15 +msgid "django CMS Blog" +msgstr "django CMS Blog" + +#: cms_app.py:15 cms_toolbar.py:19 settings.py:111 +msgid "Blog" +msgstr "Blog" + +#: cms_appconfig.py:20 +msgid "application title" +msgstr "TItre de l’application" + +#: cms_appconfig.py:22 +msgid "object name" +msgstr "Nom de l’objet" + +#: cms_appconfig.py:27 +#| msgid "blog categories" +msgid "blog config" +msgstr "Configuration du blog" + +#: cms_appconfig.py:28 +#| msgid "blog categories" +msgid "blog configs" +msgstr "Configurations du blog" + +#: cms_appconfig.py:31 +msgid "untitled" +msgstr "Titre" + +#: cms_appconfig.py:36 +msgid "Post published by default" +msgstr "Post publié par défaut" + +#: cms_appconfig.py:40 +msgid "Permalink structure" +msgstr "Structure permalien" + +#: cms_appconfig.py:45 +msgid "Use placeholder and plugins for article body" +msgstr "Utiliser une balise et des plugins pour le corps de l’article" + +#: cms_appconfig.py:49 +msgid "Use abstract field" +msgstr "Utiliser un champ abstrait" + +#: cms_appconfig.py:53 +msgid "Set author" +msgstr "Auteur" + +#: cms_appconfig.py:53 +msgid "Set author by default" +msgstr "Spécifier l’auteur par défaut" + +#: cms_appconfig.py:57 +msgid "Paginate size" +msgstr "Nombre d’article par page" + +#: cms_appconfig.py:58 +msgid "When paginating list views, how many articles per page?" +msgstr "" +"Lors de la pagination des listes, combien souhaitez vous afficher d’articles " +"par page ?" + +#: cms_appconfig.py:61 +msgid "Template prefix" +msgstr "Prefixe dans le template" + +#: cms_appconfig.py:62 +msgid "Alternative directory to load the blog templates from" +msgstr "Répertoire alternatif à partir du quel charger les templates du blog" + +#: cms_appconfig.py:65 +msgid "Menu structure" +msgstr "Structure du menu" + +#: cms_appconfig.py:67 +msgid "Structure of the django CMS menu" +msgstr "Structure du menu django CMS" + +#: cms_appconfig.py:70 +msgid "Sitemap changefreq" +msgstr "changefreq de la Sitemap" + +#: cms_appconfig.py:73 +msgid "Changefreq attribute for sitemap items" +msgstr "Attribut ‘Changfreq ‘ pour chaque entrée de la sitemap." + +#: cms_appconfig.py:76 +msgid "Sitemap priority" +msgstr "Priorité de la sitemap" + +#: cms_appconfig.py:78 +msgid "Priority attribute for sitemap items" +msgstr "Priorité de chaque entrée de la sitemap" + +#: cms_appconfig.py:81 +msgid "Object type" +msgstr "Type de l’objet" + +#: cms_appconfig.py:85 +msgid "Facebook type" +msgstr "Facebook type" + +#: cms_appconfig.py:89 +msgid "Facebook application ID" +msgstr "Facebook application ID" + +#: cms_appconfig.py:93 +msgid "Facebook profile ID" +msgstr "Facebook profile ID" + +#: cms_appconfig.py:97 +msgid "Facebook page URL" +msgstr "Facebook page URL" + +#: cms_appconfig.py:101 +msgid "Facebook author URL" +msgstr "Facebook author URL" + +#: cms_appconfig.py:105 +msgid "Facebook author" +msgstr "Auteur" + +#: cms_appconfig.py:109 +msgid "Twitter type" +msgstr "Twitter type" + +#: cms_appconfig.py:113 +msgid "Twitter site handle" +msgstr "Twitter site handle" + +#: cms_appconfig.py:117 +msgid "Twitter author handle" +msgstr "Twitter author handle" + +#: cms_appconfig.py:121 +msgid "Google+ type" +msgstr "Google+ type" + +#: cms_appconfig.py:125 +msgid "Google+ author name" +msgstr "Google+ author name" + +#: cms_toolbar.py:22 +msgid "Post list" +msgstr "Post list" + +#: cms_toolbar.py:24 +msgid "Add post" +msgstr "Add post" + +#: cms_toolbar.py:28 +msgid "Edit configuration" +msgstr "Modifier la configuration" + +#: cms_toolbar.py:32 +msgid "Edit Post" +msgstr "Modifier Post" + +#: cms_wizards.py:47 +#, python-brace-format +msgid "New {0}" +msgstr "Nouveau {0}" + +#: cms_wizards.py:51 +#, python-brace-format +msgid "Create a new {0} in {1}" +msgstr "Ajouter un nouveau {0} dans {1}" + +#: feeds.py:24 +#, python-format +msgid "Blog articles on %(site_name)s" +msgstr "Articles de blog sur le site %(site_name)s" + +#: menu.py:16 +msgid "Blog menu" +msgstr "Catégorie du blog" + +#: models.py:34 +msgid "parent" +msgstr "père" + +#: models.py:35 +msgid "created at" +msgstr "crée le" + +#: models.py:36 +msgid "modified at" +msgstr "modifié le" + +#: models.py:38 models.py:123 models.py:275 +msgid "app. config" +msgstr "app. config" + +#: models.py:42 +msgid "name" +msgstr "nom" + +#: models.py:43 models.py:128 +msgid "slug" +msgstr "slug" + +#: models.py:50 +msgid "blog category" +msgstr "catégorie du blog" + +#: models.py:51 +msgid "blog categories" +msgstr "catégories du blog" + +#: models.py:91 +msgid "author" +msgstr "auteur" + +#: models.py:94 +msgid "created" +msgstr "crée le" + +#: models.py:95 +msgid "last modified" +msgstr "modifié le" + +#: models.py:96 +msgid "published since" +msgstr "publié depuis" + +#: models.py:98 +msgid "published until" +msgstr "publié jusqu’à" + +#: models.py:100 +msgid "publish" +msgstr "publier" + +#: models.py:101 +msgid "category" +msgstr "catégorie" + +#: models.py:103 +msgid "main image" +msgstr "Image principale" + +#: models.py:107 +msgid "main image thumbnail" +msgstr "Miniature image principale" + +#: models.py:112 +msgid "main image full" +msgstr "Image principale taille réelle" + +#: models.py:116 +msgid "enable comments on post" +msgstr "Activer les commentaires sur l’article" + +#: models.py:118 +msgid "Site(s)" +msgstr "Site(s)" + +#: models.py:119 +msgid "" +"Select sites in which to show the post. If none is set it will be visible in " +"all the configured sites." +msgstr "" +"Selectionnez les sites dans lesquels afficher l’article. Si aucun site n’est " +"selectionné, l’article sera visible dans tous les sites." + +#: models.py:127 +msgid "title" +msgstr "Titre" + +#: models.py:129 +msgid "abstract" +msgstr "abstract" + +#: models.py:130 +msgid "post meta description" +msgstr "Description ‘meta’ de l’article" + +#: models.py:132 +msgid "post meta keywords" +msgstr "Mots clés ‘meta’ de l’article" + +#: models.py:134 +msgid "post meta title" +msgstr "Titre ‘meta’ de l’article" + +#: models.py:135 +msgid "used in title tag and social sharing" +msgstr "Visible dans le titre et dans le partage sur les réseaux sociaux" + +#: models.py:138 +msgid "text" +msgstr "texte" + +#: models.py:175 +msgid "blog article" +msgstr "article du blog" + +#: models.py:176 +msgid "blog articles" +msgstr "articles du blog" + +#: models.py:294 models.py:328 +#, fuzzy +msgid "articles" +msgstr "0 articles" + +#: models.py:295 +msgid "The number of latests articles to be displayed." +msgstr "Nombre d’articles récents à afficher." + +#: models.py:297 +msgid "filter by tag" +msgstr "filtrer par tag" + +#: models.py:298 +msgid "Show only the blog articles tagged with chosen tags." +msgstr "Afficher seulement les articles qui ont les tags séléctionnés." + +#: models.py:301 +msgid "filter by category" +msgstr "filtrer par catégorie" + +#: models.py:302 +msgid "Show only the blog articles tagged with chosen categories." +msgstr "Afficher seulement les articles des catégories séléctionnées" + +#: models.py:306 +#, python-format +msgid "%s latest articles by tag" +msgstr "%s derniers articles par tag" + +#: models.py:324 +msgid "authors" +msgstr "Auteurs" + +#: models.py:329 +msgid "The number of author articles to be displayed." +msgstr "Le nombre d’articles de l’auteur à afficher" + +#: models.py:333 +#, python-format +msgid "%s latest articles by author" +msgstr "%s derniers articles par auteur" + +#: models.py:362 +msgid "generic blog plugin" +msgstr "plugin générique pour le blog" + +#: settings.py:16 +msgid "Full date" +msgstr "Date complète" + +#: settings.py:17 +msgid "Year / Month" +msgstr "Année / Mois" + +#: settings.py:18 templates/djangocms_blog/post_list.html:14 +msgid "Category" +msgstr "Catégorie" + +#: settings.py:19 +#, fuzzy +msgid "Just slug" +msgstr "slug" + +#: settings.py:28 +msgid "Categories and posts" +msgstr "Catégories" + +#: settings.py:29 +msgid "Categories only" +msgstr "Catégories" + +#: settings.py:30 +msgid "Posts only" +msgstr "Articles" + +#: settings.py:31 +msgid "None" +msgstr "Aucun" + +#: settings.py:34 +msgid "always" +msgstr "toujours" + +#: settings.py:35 +msgid "hourly" +msgstr "toutes les heures" + +#: settings.py:36 +msgid "daily" +msgstr "quotidien" + +#: settings.py:37 +msgid "weekly" +msgstr "hebdomadaire" + +#: settings.py:38 +msgid "monthly" +msgstr "mensuel" + +#: settings.py:39 +msgid "yearly" +msgstr "annuel" + +#: settings.py:40 +msgid "never" +msgstr "jamais" + +#: settings.py:113 +msgid "Latest Blog Articles" +msgstr "Articles récents du blog" + +#: settings.py:115 +msgid "Author Blog Articles" +msgstr "Articles de l’auteur" + +#: settings.py:117 templates/djangocms_blog/plugins/tags.html:3 +msgid "Tags" +msgstr "Tags" + +#: settings.py:119 templates/djangocms_blog/plugins/categories.html:3 +msgid "Categories" +msgstr "Catégories" + +#: settings.py:121 templates/djangocms_blog/plugins/archive.html:3 +#: templates/djangocms_blog/post_list.html:12 +msgid "Archive" +msgstr "Archive" + +#: templates/djangocms_blog/includes/blog_item.html:24 +msgid "read more" +msgstr "lire la suite" + +#: templates/djangocms_blog/includes/blog_meta.html:6 +msgid "by" +msgstr "par" + +#: templates/djangocms_blog/plugins/archive.html:17 +#: templates/djangocms_blog/plugins/authors.html:10 +#: templates/djangocms_blog/plugins/categories.html:10 +#: templates/djangocms_blog/plugins/tags.html:10 +#, python-format +msgid "1 article" +msgid_plural "%(articles)s articles" +msgstr[0] "1 article" +msgstr[1] "%(articles)s articles" + +#: templates/djangocms_blog/plugins/archive.html:18 +#: templates/djangocms_blog/plugins/authors.html:11 +#: templates/djangocms_blog/plugins/categories.html:11 +#: templates/djangocms_blog/plugins/tags.html:11 +msgid "0 articles" +msgstr "0 articles" + +#: templates/djangocms_blog/plugins/archive.html:26 +#: templates/djangocms_blog/plugins/authors.html:15 +#: templates/djangocms_blog/plugins/latest_entries.html:7 +#: templates/djangocms_blog/plugins/tags.html:15 +#: templates/djangocms_blog/post_list.html:21 +msgid "No article found." +msgstr "Aucun article trouvé" + +#: templates/djangocms_blog/plugins/authors.html:3 +msgid "Authors" +msgstr "Auteurs" + +#: templates/djangocms_blog/plugins/categories.html:15 +msgid "No categories found." +msgstr "Aucune catégorie trouvé" + +#: templates/djangocms_blog/post_list.html:11 +msgid "Articles by" +msgstr "Articles écrits par" + +#: templates/djangocms_blog/post_list.html:13 +msgid "Tag" +msgstr "Tag" + +#: templates/djangocms_blog/post_list.html:24 +msgid "Back" +msgstr "Retour" + +#: templates/djangocms_blog/post_list.html:29 +msgid "previous" +msgstr "précédent" + +#: templates/djangocms_blog/post_list.html:32 +msgid "Page" +msgstr "Page" + +#: templates/djangocms_blog/post_list.html:32 +msgid "of" +msgstr "sur" + +#: templates/djangocms_blog/post_list.html:35 +msgid "next" +msgstr "suivant" + +#, fuzzy +#~ msgid "Article" +#~ msgstr "Articles" + +#~ msgid "Text" +#~ msgstr "Text" + +#~ msgid "blog post" +#~ msgstr "blog post" + +#~ msgid "Entries by" +#~ msgstr "Entries by" + +#~ msgid "No entry found." +#~ msgstr "No entry found." From 1afb15f308968b3080682b87131033abab0c29a7 Mon Sep 17 00:00:00 2001 From: Olivier Tabone Date: Wed, 20 Jan 2016 19:13:09 +0100 Subject: [PATCH 19/69] update fr translation --- AUTHORS.rst | 1 + .../locale/fr/LC_MESSAGES/django.mo | Bin 7611 -> 7605 bytes .../locale/fr/LC_MESSAGES/django.po | 6 +++--- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index 1496f47..9133313 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -25,3 +25,4 @@ Contributors * Stefan Wehrmeyer * Sylvain Fankhauser * Tadas Dailyda +* Olivier Tabone diff --git a/djangocms_blog/locale/fr/LC_MESSAGES/django.mo b/djangocms_blog/locale/fr/LC_MESSAGES/django.mo index baa0c014f72d034298dcfc8d7decde2d1e2758d3..8581c1461b398c3e21af7eb5ae2c2850c69afbb7 100644 GIT binary patch delta 349 zcmXZXu}Z^G6vpvGO_SQRO&W_xli<>#Q=yJcAm|`n97+eVi$g{!-3o#>yNh5ZN0*L8 z2%SXo1ipo9pF#hZ-syMGcP}63ens2pGd43%M0{W52nTq8S6Ihutl>mE!$am29h~Di zKI1X2b^eW~%s<%19oqPZF51EVJ_sa}E`u-KG%sKY) z9eY@!THqH|uMzHhU2HL*p!)b(n20nvj0g-Iqbj`7PPKPIzB@B-uX z4yLh>J2*x?{~F|Ybo5xl9P0Zr1%{NjM`veg@nVlLrTSuOgH1P&k@CEfL q@BY1!PKGK~|1mo?OK!LAbiCf>z;V09Yp-~9>vrUDIrVGSF!Tow%`LA0 diff --git a/djangocms_blog/locale/fr/LC_MESSAGES/django.po b/djangocms_blog/locale/fr/LC_MESSAGES/django.po index 1ff3d1e..d9e925d 100644 --- a/djangocms_blog/locale/fr/LC_MESSAGES/django.po +++ b/djangocms_blog/locale/fr/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-12-20 17:14+0100\n" -"PO-Revision-Date: 2016-01-20 19:07+0100\n" +"PO-Revision-Date: 2016-01-20 19:12+0100\n" "Last-Translator: Olivier Tabone \n" "Language-Team: FR <>\n" "Language: fr\n" @@ -42,12 +42,12 @@ msgstr "Nom de l’objet" #: cms_appconfig.py:27 #| msgid "blog categories" msgid "blog config" -msgstr "Configuration du blog" +msgstr "Catégorie du blog" #: cms_appconfig.py:28 #| msgid "blog categories" msgid "blog configs" -msgstr "Configurations du blog" +msgstr "Catégories du blog" #: cms_appconfig.py:31 msgid "untitled" From e1c63e42b7b5bcdb795debf3ec776cec20214588 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Mon, 25 Jan 2016 22:55:12 +0100 Subject: [PATCH 20/69] Update README --- README.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.rst b/README.rst index bf6c780..993a980 100644 --- a/README.rst +++ b/README.rst @@ -176,6 +176,9 @@ suited for your deployment. {'code': 'it',}, {'code': 'fr',}, ), + 'default': { + 'fallbacks': ['en', 'it', 'fr'], + } } * Add the following to your ``urls.py``:: From 0047f0d505c8baca3685675c3e78613a3ab8fafd Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Tue, 26 Jan 2016 07:41:50 +0100 Subject: [PATCH 21/69] Pin django-taggit --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 92c1675..0ed8921 100644 --- a/tox.ini +++ b/tox.ini @@ -6,6 +6,7 @@ commands = {env:COMMAND:python} cms_helper.py test djangocms_blog --no-migrate deps = -r{toxinidir}/requirements-test.txt django16: Django>=1.6,<1.7 + django16: django-taggit<0.18 django17: Django>=1.7,<1.8 django18: Django>=1.8,<1.9 django19: Django>=1.9,<1.10 From 70e6b6e52354dfec3b7e435ff491a24846ad5b68 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Wed, 25 Nov 2015 10:34:50 +0100 Subject: [PATCH 22/69] Fix setting author --- djangocms_blog/cms_wizards.py | 14 ++++++++++++ tests/test_wizards.py | 43 +++++++++++++++++++++++------------ 2 files changed, 43 insertions(+), 14 deletions(-) diff --git a/djangocms_blog/cms_wizards.py b/djangocms_blog/cms_wizards.py index d308278..56e706e 100644 --- a/djangocms_blog/cms_wizards.py +++ b/djangocms_blog/cms_wizards.py @@ -1,6 +1,11 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals +from cms.utils.permissions import get_current_user +from django.contrib.auth import get_user_model + +from djangocms_blog.settings import get_setting + try: from cms.wizards.wizard_base import Wizard from cms.wizards.wizard_pool import wizard_pool @@ -35,6 +40,15 @@ try: class Media: js = ('admin/js/jquery.js', 'admin/js/jquery.init.js',) + def save(self, commit=True): + if not self.instance.author_id and self.instance.app_config.set_author: + if get_setting('AUTHOR_DEFAULT') is True: + user = get_current_user() + else: + user = get_user_model().objects.get(username=get_setting('AUTHOR_DEFAULT')) + self.instance.author = user + return super(PostWizardForm, self).save(commit) + class PostWizard(Wizard): pass diff --git a/tests/test_wizards.py b/tests/test_wizards.py index 3cc6901..2f755d1 100644 --- a/tests/test_wizards.py +++ b/tests/test_wizards.py @@ -5,7 +5,9 @@ import sys from distutils.version import LooseVersion import cms +from cms.utils.permissions import current_user +from djangocms_blog.settings import get_setting from .base import BaseTest try: @@ -51,21 +53,34 @@ class WizardTest(BaseTest): from djangocms_blog.models import Post self.get_pages() - wizs = [entry for entry in wizard_pool.get_entries() if entry.model == Post] - for wiz in wizs: - app_config = self.app_config_1.pk if wiz.title == 'New Blog' else self.app_config_2.pk - form = wiz.form() - self.assertTrue(form.initial.get('app_config', False), app_config) - self.assertTrue(form.fields['app_config'].widget.attrs['disabled']) + with current_user(self.user_staff): + wizs = [entry for entry in wizard_pool.get_entries() if entry.model == Post] + for index, wiz in enumerate(wizs): + app_config = self.app_config_1.pk if wiz.title == 'New Blog' else self.app_config_2.pk + form = wiz.form() + self.assertTrue(form.initial.get('app_config', False), app_config) + self.assertTrue(form.fields['app_config'].widget.attrs['disabled']) - form = wiz.form(data={ - '1-title': 'title', - '1-abstract': 'abstract', - '1-categories': [self.category_1.pk], - }, prefix=1) - self.assertEqual(form.default_appconfig, app_config) - self.assertTrue(form.is_valid()) - self.assertTrue(form.cleaned_data['app_config'], app_config) + form = wiz.form(data={ + '1-title': 'title{0}'.format(index), + '1-abstract': 'abstract{0}'.format(index), + '1-categories': [self.category_1.pk], + }, prefix=1) + self.assertEqual(form.default_appconfig, app_config) + self.assertTrue(form.is_valid()) + self.assertTrue(form.cleaned_data['app_config'], app_config) + instance = form.save() + self.assertEqual(instance.author, self.user_staff) + + with self.settings(BLOG_AUTHOR_DEFAULT='normal'): + for index, wiz in enumerate(wizs): + form = wiz.form(data={ + '1-title': 'title-2{0}'.format(index), + '1-abstract': 'abstract-2{0}'.format(index), + '1-categories': [self.category_1.pk], + }, prefix=1) + instance = form.save() + self.assertEqual(instance.author, self.user_normal) def test_wizard_import(self): # The following import should not fail in any django CMS version From 395185f5fee1ce26675d4861743c8965704dd45f Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Thu, 26 Nov 2015 07:54:20 +0100 Subject: [PATCH 23/69] Code refactoring --- djangocms_blog/admin.py | 8 +------- djangocms_blog/cms_wizards.py | 10 +--------- djangocms_blog/models.py | 9 +++++++++ tests/test_wizards.py | 5 ++++- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/djangocms_blog/admin.py b/djangocms_blog/admin.py index 3036c51..c2fa423 100755 --- a/djangocms_blog/admin.py +++ b/djangocms_blog/admin.py @@ -8,7 +8,6 @@ from cms.admin.placeholderadmin import FrontendEditableAdminMixin, PlaceholderAd from django import forms from django.conf import settings from django.contrib import admin -from django.contrib.auth import get_user_model from django.utils.six import callable from django.utils.translation import ugettext_lazy as _ from parler.admin import TranslatableAdmin @@ -118,12 +117,7 @@ class PostAdmin(PlaceholderAdminMixin, FrontendEditableAdminMixin, return {'slug': ('title',)} def save_model(self, request, obj, form, change): - if not obj.author_id and obj.app_config.set_author: - if get_setting('AUTHOR_DEFAULT') is True: - user = request.user - else: - user = get_user_model().objects.get(username=get_setting('AUTHOR_DEFAULT')) - obj.author = user + obj._set_default_author(request.user) super(PostAdmin, self).save_model(request, obj, form, change) class Media: diff --git a/djangocms_blog/cms_wizards.py b/djangocms_blog/cms_wizards.py index 56e706e..1b09965 100644 --- a/djangocms_blog/cms_wizards.py +++ b/djangocms_blog/cms_wizards.py @@ -2,9 +2,6 @@ from __future__ import absolute_import, print_function, unicode_literals from cms.utils.permissions import get_current_user -from django.contrib.auth import get_user_model - -from djangocms_blog.settings import get_setting try: from cms.wizards.wizard_base import Wizard @@ -41,12 +38,7 @@ try: js = ('admin/js/jquery.js', 'admin/js/jquery.init.js',) def save(self, commit=True): - if not self.instance.author_id and self.instance.app_config.set_author: - if get_setting('AUTHOR_DEFAULT') is True: - user = get_current_user() - else: - user = get_user_model().objects.get(username=get_setting('AUTHOR_DEFAULT')) - self.instance.author = user + self.instance._set_default_author(get_current_user()) return super(PostWizardForm, self).save(commit) class PostWizard(Wizard): diff --git a/djangocms_blog/models.py b/djangocms_blog/models.py index 3e74137..c65ce8e 100644 --- a/djangocms_blog/models.py +++ b/djangocms_blog/models.py @@ -5,6 +5,7 @@ from aldryn_apphooks_config.fields import AppHookConfigField from aldryn_apphooks_config.managers.parler import AppHookConfigTranslatableManager from cms.models import CMSPlugin, PlaceholderField from django.conf import settings as dj_settings +from django.contrib.auth import get_user_model from django.core.urlresolvers import reverse from django.db import models from django.utils import timezone @@ -254,6 +255,14 @@ class Post(ModelMeta, TranslatableModel): def get_author(self): return self.author + def _set_default_author(self, current_user): + if not self.author_id and self.app_config.set_author: + if get_setting('AUTHOR_DEFAULT') is True: + user = current_user + else: + user = get_user_model().objects.get(username=get_setting('AUTHOR_DEFAULT')) + self.author = user + def thumbnail_options(self): if self.main_image_thumbnail_id: return self.main_image_thumbnail.as_dict diff --git a/tests/test_wizards.py b/tests/test_wizards.py index 2f755d1..1035035 100644 --- a/tests/test_wizards.py +++ b/tests/test_wizards.py @@ -7,7 +7,6 @@ from distutils.version import LooseVersion import cms from cms.utils.permissions import current_user -from djangocms_blog.settings import get_setting from .base import BaseTest try: @@ -74,11 +73,15 @@ class WizardTest(BaseTest): with self.settings(BLOG_AUTHOR_DEFAULT='normal'): for index, wiz in enumerate(wizs): + app_config = self.app_config_1.pk if wiz.title == 'New Blog' else self.app_config_2.pk form = wiz.form(data={ '1-title': 'title-2{0}'.format(index), '1-abstract': 'abstract-2{0}'.format(index), '1-categories': [self.category_1.pk], }, prefix=1) + self.assertEqual(form.default_appconfig, app_config) + self.assertTrue(form.is_valid()) + self.assertTrue(form.cleaned_data['app_config'], app_config) instance = form.save() self.assertEqual(instance.author, self.user_normal) From 4db9bef8c6d4dfeff3a9b1a03fa1606009268e6f Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Fri, 27 Nov 2015 00:14:33 +0100 Subject: [PATCH 24/69] Fix import --- tests/test_wizards.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_wizards.py b/tests/test_wizards.py index 1035035..56fe2a2 100644 --- a/tests/test_wizards.py +++ b/tests/test_wizards.py @@ -5,7 +5,6 @@ import sys from distutils.version import LooseVersion import cms -from cms.utils.permissions import current_user from .base import BaseTest @@ -48,6 +47,7 @@ class WizardTest(BaseTest): @skipIf(LooseVersion(cms.__version__) < LooseVersion('3.2'), reason='Wizards not available for django CMS < 3.2') def test_wizard_init(self): + from cms.utils.permissions import current_user from cms.wizards.wizard_pool import wizard_pool from djangocms_blog.models import Post self.get_pages() From 0f2abd8627f530206af722f27a13c48cbd4bcd16 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sat, 26 Dec 2015 22:54:23 +0100 Subject: [PATCH 25/69] Make category not required again --- HISTORY.rst | 5 +++++ .../migrations/0013_auto_20160201_2235.py | 20 +++++++++++++++++++ djangocms_blog/models.py | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 djangocms_blog/migrations/0013_auto_20160201_2235.py diff --git a/HISTORY.rst b/HISTORY.rst index 9721b4f..b2cfb9a 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,11 @@ History ------- +0.6.4 (unreleased) +++++++++++++++++++ + +* Make categories non required + 0.6.3 (2015-12-22) ++++++++++++++++++ diff --git a/djangocms_blog/migrations/0013_auto_20160201_2235.py b/djangocms_blog/migrations/0013_auto_20160201_2235.py new file mode 100644 index 0000000..ffdafe1 --- /dev/null +++ b/djangocms_blog/migrations/0013_auto_20160201_2235.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.2 on 2016-02-01 21:35 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('djangocms_blog', '0012_auto_20151220_1734'), + ] + + operations = [ + migrations.AlterField( + model_name='post', + name='categories', + field=models.ManyToManyField(blank=True, related_name='blog_posts', to='djangocms_blog.BlogCategory', verbose_name='category'), + ), + ] diff --git a/djangocms_blog/models.py b/djangocms_blog/models.py index 3e74137..074ec84 100644 --- a/djangocms_blog/models.py +++ b/djangocms_blog/models.py @@ -99,7 +99,7 @@ class Post(ModelMeta, TranslatableModel): blank=True) publish = models.BooleanField(_('publish'), default=False) categories = models.ManyToManyField('djangocms_blog.BlogCategory', verbose_name=_('category'), - related_name='blog_posts',) + related_name='blog_posts', blank=True) main_image = FilerImageField(verbose_name=_('main image'), blank=True, null=True, on_delete=models.SET_NULL, related_name='djangocms_blog_post_image') From e5e7415d06e60ebca9967269cc14a002ee7d2c9e Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Tue, 2 Feb 2016 11:36:08 +0100 Subject: [PATCH 26/69] Update README --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 993a980..0e773d3 100644 --- a/README.rst +++ b/README.rst @@ -30,7 +30,7 @@ djangocms-blog :target: https://codeclimate.com/github/nephila/djangocms-blog :alt: Code Climate -A djangoCMS 3 blog application. +django CMS blog application - Support for multilingual posts, placeholders, social network meta tags and configurable apphooks. Supported Django versions: From 1939ec7919b5fcc05cac215aab72e89928e71ac3 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Thu, 4 Feb 2016 04:53:40 +0100 Subject: [PATCH 27/69] Fix menu behavior --- README.rst | 15 +++++++++------ djangocms_blog/menu.py | 21 ++++++++++++--------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/README.rst b/README.rst index 993a980..daedebe 100644 --- a/README.rst +++ b/README.rst @@ -51,7 +51,7 @@ Supported django CMS versions: you have issues with tags, upgrade to latest version to have it fixed. .. warning:: When upgrading to version 0.6, check that every post as an attached - category, or select a menu without categories. + category, or select a menu without categories. .. warning:: Starting from version 0.5, this package does not declare dependency on South anymore; please install it separately if using this @@ -235,11 +235,14 @@ Menu ``djangocms_blog`` provides support for django CMS menu framework. -By default all the categories and posts are added to the menu, in a hierarcical structure. +By default all the categories and posts are added to the menu, in a hierarchical structure. Is it possibile to configure per Apphook, whether the menu includes post and categories (the default), only categorie, only posts or no item. +If "post and categories" or "only categories" are set, all the posts not associated with a +category are not added to the menu. + Templates +++++++++ @@ -374,14 +377,14 @@ Global Settings (default: ``False``) * BLOG_ADMIN_POST_FIELDSET_FILTER: Callable function to change(add or filter) fields to fieldsets for admin post edit form; (default: ``False``). Function simple example:: - - + + def fieldset_filter_function(fsets, request, obj=None): if request.user.groups.filter(name='Editor').exists(): fsets[1][1]['fields'][0].append('author') # adding 'author' field if user is Editor return fsets - - + + * BLOG_AVAILABLE_PERMALINK_STYLES: Choices of permalinks styles; * BLOG_PERMALINK_URLS: URLConf corresponding to BLOG_AVAILABLE_PERMALINK_STYLES; diff --git a/djangocms_blog/menu.py b/djangocms_blog/menu.py index 036811e..75e5564 100644 --- a/djangocms_blog/menu.py +++ b/djangocms_blog/menu.py @@ -52,20 +52,23 @@ class BlogCategoryMenu(CMSAttachMenu): posts = posts.namespace(self.instance.application_namespace) posts = posts.active_translations(language).distinct() for post in posts: + post_id = None if categories_menu: category = post.categories.first() - parent = '%s-%s' % (category.__class__.__name__, category.pk) - post_id = '%s-%s' % (post.__class__.__name__, post.pk), + if category: + parent = '%s-%s' % (category.__class__.__name__, category.pk) + post_id = '%s-%s' % (post.__class__.__name__, post.pk), else: parent = None post_id = '%s-%s' % (post.__class__.__name__, post.pk), - node = NavigationNode( - post.get_title(), - post.get_absolute_url(language), - post_id, - parent - ) - nodes.append(node) + if post_id: + node = NavigationNode( + post.get_title(), + post.get_absolute_url(language), + post_id, + parent + ) + nodes.append(node) return nodes From 178b9bdcc7aac59c4166cf82f317e663b8cee5ee Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Thu, 4 Feb 2016 06:13:35 +0100 Subject: [PATCH 28/69] Testing post in menu depending if category is present --- tests/test_menu.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/test_menu.py b/tests/test_menu.py index 36380ac..b020625 100644 --- a/tests/test_menu.py +++ b/tests/test_menu.py @@ -37,7 +37,7 @@ class MenuTest(BaseTest): """ Tests if all categories are present in the menu """ - self.get_posts() + posts = self.get_posts() self.get_pages() for lang in ('en', 'it'): @@ -47,6 +47,16 @@ class MenuTest(BaseTest): nodes_url = set([node.url for node in nodes]) cats_url = set([cat.get_absolute_url() for cat in self.cats if cat.has_translation(lang)]) self.assertTrue(cats_url.issubset(nodes_url)) + menu_pool.clear() + + posts[0].categories.clear() + for lang in ('en', 'it'): + request = self.get_page_request(None, self.user, r'/%s/page-two/' % lang) + with smart_override(lang): + nodes = menu_pool.get_nodes(request, namespace='BlogCategoryMenu') + nodes_url = set([node.url for node in nodes]) + self.assertFalse(posts[0].get_absolute_url() in nodes_url) + self.assertTrue(posts[1].get_absolute_url() in nodes_url) def test_menu_options(self): """ From 105171d2ad617dc1deb805d505fd55c434712576 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sun, 7 Feb 2016 12:16:24 +0100 Subject: [PATCH 29/69] Fix cache leaks --- cms_helper.py | 2 +- djangocms_blog/menu.py | 2 +- tests/test_menu.py | 25 +++++++++++++------------ 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/cms_helper.py b/cms_helper.py index 40ac322..f2f14eb 100755 --- a/cms_helper.py +++ b/cms_helper.py @@ -69,7 +69,7 @@ HELPER_SETTINGS = dict( {'code': 'en'}, ), 'default': { - 'fallback': 'en', + 'fallbacks': ['en'], 'hide_untranslated': False, } }, diff --git a/djangocms_blog/menu.py b/djangocms_blog/menu.py index 75e5564..8d7920f 100644 --- a/djangocms_blog/menu.py +++ b/djangocms_blog/menu.py @@ -53,13 +53,13 @@ class BlogCategoryMenu(CMSAttachMenu): posts = posts.active_translations(language).distinct() for post in posts: post_id = None + parent = None if categories_menu: category = post.categories.first() if category: parent = '%s-%s' % (category.__class__.__name__, category.pk) post_id = '%s-%s' % (post.__class__.__name__, post.pk), else: - parent = None post_id = '%s-%s' % (post.__class__.__name__, post.pk), if post_id: node = NavigationNode( diff --git a/tests/test_menu.py b/tests/test_menu.py index b020625..ded13e1 100644 --- a/tests/test_menu.py +++ b/tests/test_menu.py @@ -3,7 +3,7 @@ from __future__ import absolute_import, print_function, unicode_literals from aldryn_apphooks_config.utils import get_app_instance from django.core.cache import cache -from django.utils.translation import activate +from django.utils.translation import activate, override from menus.menu_pool import menu_pool from parler.utils.context import smart_override, switch_language @@ -32,28 +32,29 @@ class MenuTest(BaseTest): # All cms menu modifiers should be removed from menu_pool.modifiers # so that they do not interfere with our menu nodes menu_pool.modifiers = [m for m in menu_pool.modifiers if m.__module__.startswith('djangocms_blog')] + cache.clear() def test_menu_nodes(self): """ Tests if all categories are present in the menu """ posts = self.get_posts() - self.get_pages() + pages = self.get_pages() for lang in ('en', 'it'): - request = self.get_page_request(None, self.user, r'/%s/page-two/' % lang) + request = self.get_page_request(pages[1], self.user, pages[1].get_absolute_url(lang)) with smart_override(lang): - nodes = menu_pool.get_nodes(request, namespace='BlogCategoryMenu') + nodes = menu_pool.get_nodes(request) nodes_url = set([node.url for node in nodes]) cats_url = set([cat.get_absolute_url() for cat in self.cats if cat.has_translation(lang)]) self.assertTrue(cats_url.issubset(nodes_url)) - menu_pool.clear() + cache.clear() posts[0].categories.clear() for lang in ('en', 'it'): - request = self.get_page_request(None, self.user, r'/%s/page-two/' % lang) + request = self.get_page_request(pages[1], self.user, pages[1].get_absolute_url(lang)) with smart_override(lang): - nodes = menu_pool.get_nodes(request, namespace='BlogCategoryMenu') + nodes = menu_pool.get_nodes(request) nodes_url = set([node.url for node in nodes]) self.assertFalse(posts[0].get_absolute_url() in nodes_url) self.assertTrue(posts[1].get_absolute_url() in nodes_url) @@ -82,7 +83,7 @@ class MenuTest(BaseTest): for lang in languages: request = self.get_page_request(None, self.user, r'/%s/page-two/' % lang) with smart_override(lang): - nodes = menu_pool.get_nodes(request, namespace='BlogCategoryMenu') + nodes = menu_pool.get_nodes(request) nodes_url = set([node.url for node in nodes]) self.assertFalse(cats_url[lang].issubset(nodes_url)) self.assertFalse(posts_url[lang].issubset(nodes_url)) @@ -94,7 +95,7 @@ class MenuTest(BaseTest): for lang in languages: request = self.get_page_request(None, self.user, r'/%s/page-two/' % lang) with smart_override(lang): - nodes = menu_pool.get_nodes(request, namespace='BlogCategoryMenu') + nodes = menu_pool.get_nodes(request) nodes_url = set([node.url for node in nodes]) self.assertFalse(cats_url[lang].issubset(nodes_url)) self.assertTrue(posts_url[lang].issubset(nodes_url)) @@ -106,7 +107,7 @@ class MenuTest(BaseTest): for lang in languages: request = self.get_page_request(None, self.user, r'/%s/page-two/' % lang) with smart_override(lang): - nodes = menu_pool.get_nodes(request, namespace='BlogCategoryMenu') + nodes = menu_pool.get_nodes(request) nodes_url = set([node.url for node in nodes]) self.assertTrue(cats_url[lang].issubset(nodes_url)) self.assertFalse(posts_url[lang].issubset(nodes_url)) @@ -118,7 +119,7 @@ class MenuTest(BaseTest): for lang in languages: request = self.get_page_request(None, self.user, r'/%s/page-two/' % lang) with smart_override(lang): - nodes = menu_pool.get_nodes(request, namespace='BlogCategoryMenu') + nodes = menu_pool.get_nodes(request) nodes_url = set([node.url for node in nodes]) self.assertTrue(cats_url[lang].issubset(nodes_url)) self.assertTrue(posts_url[lang].issubset(nodes_url)) @@ -147,7 +148,7 @@ class MenuTest(BaseTest): view_obj.kwargs = {kwarg: obj.slug} view_obj.get(request) # check if selected menu node points to cat - nodes = menu_pool.get_nodes(request, namespace='BlogCategoryMenu') + nodes = menu_pool.get_nodes(request) found = False for node in nodes: if node.selected: From 38fbe7cf85520588664d88e0a1f1a2d7f2b653d9 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sun, 7 Feb 2016 13:00:25 +0100 Subject: [PATCH 30/69] Fix tests with parler>=1.6 --- tests/base.py | 24 +++++++++++++++--------- tests/test_menu.py | 1 + 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/tests/base.py b/tests/base.py index 6442506..cb6e3f3 100644 --- a/tests/base.py +++ b/tests/base.py @@ -6,6 +6,7 @@ from copy import deepcopy from cmsplugin_filer_image.models import ThumbnailOption from django.contrib.auth import get_user_model from django.contrib.sites.models import Site +from django.core.cache import cache from djangocms_helper.base_test import BaseTestCase from haystack import connections from haystack.constants import DEFAULT_ALIAS @@ -18,7 +19,7 @@ User = get_user_model() def _get_cat_pk(lang, name): - return lambda: BlogCategory.objects.translated(lang, name=name).get().pk + return lambda: BlogCategory.objects.language(lang).translated(lang, name=name).get().pk class BaseTest(BaseTestCase): @@ -65,7 +66,8 @@ class BaseTest(BaseTestCase): 'description': 'Descrizione del terzo post', 'keywords': 'keyword5, keyword6', 'text': 'Testo del terzo post'}, }, - {'en': {'title': 'Different appconfig', 'abstract': '

Different appconfig first line

', + {'en': {'title': 'Different appconfig', + 'abstract': '

Different appconfig first line

', 'description': 'Different appconfig description', 'keywords': 'keyword5, keyword6', 'text': 'Different appconfig text', 'app_config': 'sample_app2', 'publish': True}, 'it': {'title': 'Altro appconfig', 'abstract': '

prima riga del Altro appconfig

', @@ -84,17 +86,19 @@ class BaseTest(BaseTestCase): {'en': {'name': 'Almost', 'app_config': 'sample_app'}, 'it': {'name': 'Mezzo'}, }, - {'en': {'name': 'Loud', 'parent_id': _get_cat_pk('en', 'Almost'), 'app_config': 'sample_app'}, - 'it': {'name': 'Forte', 'parent_id': _get_cat_pk('it', 'Mezzo')}, - }, - {'en': {'name': 'Silent', 'parent_id': _get_cat_pk('en', 'Almost'), 'app_config': 'sample_app'}, - }, {'en': {'name': 'Drums', 'app_config': 'sample_app2'}, 'it': {'name': 'Tamburi'}, }, {'en': {'name': 'Guitars', 'app_config': 'sample_app2'}, 'it': {'name': 'Chitarre'}, }, + {'en': {'name': 'Loud', 'parent_id': _get_cat_pk('en', 'Almost'), + 'app_config': 'sample_app'}, + 'it': {'name': 'Forte', 'parent_id': _get_cat_pk('it', 'Mezzo')}, + }, + {'en': {'name': 'Silent', 'parent_id': _get_cat_pk('en', 'Almost'), + 'app_config': 'sample_app'}, + }, ) @classmethod @@ -120,11 +124,13 @@ class BaseTest(BaseTestCase): 'sample_app': cls.app_config_1, 'sample_app2': cls.app_config_2, } - cls.category_1 = BlogCategory.objects.create(name='category 1', app_config=cls.app_config_1) + cls.category_1 = BlogCategory.objects.create(name='category 1', + app_config=cls.app_config_1) cls.category_1.set_current_language('it', initialize=True) cls.category_1.name = 'categoria 1' cls.category_1.save() cls.site_2 = Site.objects.create(domain='http://example2.com', name='example 2') + cache.clear() @classmethod def tearDownClass(cls): @@ -168,7 +174,6 @@ class BaseTest(BaseTestCase): meta_description=data['description'], meta_keywords=data['keywords'] ) - post = self.reload_model(post) post.categories.add(self.category_1) if sites: for site in sites: @@ -177,6 +182,7 @@ class BaseTest(BaseTestCase): def get_posts(self, sites=None): posts = [] + cache.clear() for post in self._post_data: post1 = self._get_post(post['en'], sites=sites) post1 = self._get_post(post['it'], post=post1, lang='it') diff --git a/tests/test_menu.py b/tests/test_menu.py index ded13e1..2a67476 100644 --- a/tests/test_menu.py +++ b/tests/test_menu.py @@ -21,6 +21,7 @@ class MenuTest(BaseTest): def setUp(self): super(MenuTest, self).setUp() self.cats = [self.category_1] + cache.clear() for i, lang_data in enumerate(self._categories_data): cat = self._get_category(lang_data['en']) if 'it' in lang_data: From fe34a6ae0172af70287fa3bfbdbad798ca5a0494 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sun, 7 Feb 2016 13:02:32 +0100 Subject: [PATCH 31/69] Use modern parler in tests --- requirements-test.txt | 1 + tox.ini | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/requirements-test.txt b/requirements-test.txt index 94e66fe..a9c6ae7 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -9,3 +9,4 @@ https://github.com/nephila/djangocms-helper/archive/develop.zip tox>=2.0 wheel pysolr +django-parler>=1.6 diff --git a/tox.ini b/tox.ini index 0ed8921..b4322e2 100644 --- a/tox.ini +++ b/tox.ini @@ -7,19 +7,19 @@ deps = -r{toxinidir}/requirements-test.txt django16: Django>=1.6,<1.7 django16: django-taggit<0.18 + django16: django-mptt<0.8 django17: Django>=1.7,<1.8 django18: Django>=1.8,<1.9 django19: Django>=1.9,<1.10 django19: https://github.com/divio/django-filer/archive/develop.zip django19: https://github.com/divio/cmsplugin-filer/archive/develop.zip cms30: https://github.com/divio/django-cms/archive/support/3.0.x.zip + cms30: django-mptt<0.8 cms31: https://github.com/divio/django-cms/archive/support/3.1.x.zip cms32: https://github.com/divio/django-cms/archive/release/3.2.x.zip https://github.com/nephila/django-meta-mixin/archive/master.zip https://github.com/nephila/djangocms-helper/archive/develop.zip py26: unittest2 - django-parler<1.5 - django-mptt<0.8 https://github.com/aldryn/aldryn-apphooks-config/archive/master.zip https://github.com/nephila/djangocms-apphook-setup/archive/master.zip From 99ebd92e38284d7e983ac63446e234c0c36e1434 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sun, 7 Feb 2016 13:07:32 +0100 Subject: [PATCH 32/69] Fix issue with django CMS 3 --- tests/test_menu.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/test_menu.py b/tests/test_menu.py index ded13e1..979709c 100644 --- a/tests/test_menu.py +++ b/tests/test_menu.py @@ -40,10 +40,11 @@ class MenuTest(BaseTest): """ posts = self.get_posts() pages = self.get_pages() + self.reload_urlconf() for lang in ('en', 'it'): - request = self.get_page_request(pages[1], self.user, pages[1].get_absolute_url(lang)) with smart_override(lang): + request = self.get_page_request(pages[1], self.user, pages[1].get_absolute_url(lang)) nodes = menu_pool.get_nodes(request) nodes_url = set([node.url for node in nodes]) cats_url = set([cat.get_absolute_url() for cat in self.cats if cat.has_translation(lang)]) @@ -52,12 +53,12 @@ class MenuTest(BaseTest): cache.clear() posts[0].categories.clear() for lang in ('en', 'it'): - request = self.get_page_request(pages[1], self.user, pages[1].get_absolute_url(lang)) with smart_override(lang): + request = self.get_page_request(pages[1], self.user, pages[1].get_absolute_url(lang)) nodes = menu_pool.get_nodes(request) nodes_url = set([node.url for node in nodes]) - self.assertFalse(posts[0].get_absolute_url() in nodes_url) - self.assertTrue(posts[1].get_absolute_url() in nodes_url) + self.assertFalse(posts[0].get_absolute_url(lang) in nodes_url) + self.assertTrue(posts[1].get_absolute_url(lang) in nodes_url) def test_menu_options(self): """ From 0e8d7f24302b659aa6355fd5b70f2b6bce6c73c8 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sun, 7 Feb 2016 13:52:57 +0100 Subject: [PATCH 33/69] Add checkignore --- .checkignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .checkignore diff --git a/.checkignore b/.checkignore new file mode 100644 index 0000000..658579c --- /dev/null +++ b/.checkignore @@ -0,0 +1,3 @@ +tests/* +docs/* +djangocms_blog/south_migrations/* From 5313642aaddf828a4cb2607807d1b22db97b8642 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sun, 7 Feb 2016 16:38:11 +0100 Subject: [PATCH 34/69] Update changelog --- HISTORY.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/HISTORY.rst b/HISTORY.rst index b2cfb9a..5149e65 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,6 +7,7 @@ History ++++++++++++++++++ * Make categories non required +* Fix tests with parler>=1.6 0.6.3 (2015-12-22) ++++++++++++++++++ From 80778b9c04d5bbbf86deb0c66c56d6e6d36b47b9 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sun, 7 Feb 2016 17:01:36 +0100 Subject: [PATCH 35/69] Fix mptt development fix --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 2b6da9f..8d74cd1 100644 --- a/tox.ini +++ b/tox.ini @@ -13,12 +13,12 @@ deps = django19: https://github.com/divio/django-filer/archive/develop.zip django19: https://github.com/divio/cmsplugin-filer/archive/develop.zip cms30: https://github.com/divio/django-cms/archive/support/3.0.x.zip - cms30: django-mptt<0.8 cms31: https://github.com/divio/django-cms/archive/support/3.1.x.zip cms32: https://github.com/divio/django-cms/archive/release/3.2.x.zip https://github.com/nephila/django-meta-mixin/archive/master.zip https://github.com/nephila/djangocms-helper/archive/develop.zip py26: unittest2 + django-mptt<0.8 https://github.com/aldryn/aldryn-apphooks-config/archive/master.zip https://github.com/nephila/djangocms-apphook-setup/archive/master.zip From 85495ee1c3be9e679382a36b270e2d6b8ed54e9d Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sun, 7 Feb 2016 19:41:04 +0100 Subject: [PATCH 36/69] Add gitlab-ci configuration --- .gitlab-ci.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..eb0dc25 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,5 @@ +# This file is generated by GitLab CI +ci: + script: + - COMMAND="coverage run" tox -epep8,isort,py35-django19-cms32,py34-django18-cms31,py27-django16-cms30 + - if [[ $? -eq 0 ]]; then coverage report; fi From a4c4f3116ebbb9f7679b6f0711dd10fbec84a978 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sun, 7 Feb 2016 21:42:08 +0100 Subject: [PATCH 37/69] Use the right mptt version --- tox.ini | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 8d74cd1..f5e33aa 100644 --- a/tox.ini +++ b/tox.ini @@ -7,9 +7,13 @@ deps = -r{toxinidir}/requirements-test.txt django16: Django>=1.6,<1.7 django16: django-taggit<0.18 + django16: django-mptt<0.8 django17: Django>=1.7,<1.8 + django17: django-mptt<0.8 django18: Django>=1.8,<1.9 + django18: django-mptt>=0.8 django19: Django>=1.9,<1.10 + django19: django-mptt>=0.8 django19: https://github.com/divio/django-filer/archive/develop.zip django19: https://github.com/divio/cmsplugin-filer/archive/develop.zip cms30: https://github.com/divio/django-cms/archive/support/3.0.x.zip @@ -18,7 +22,6 @@ deps = https://github.com/nephila/django-meta-mixin/archive/master.zip https://github.com/nephila/djangocms-helper/archive/develop.zip py26: unittest2 - django-mptt<0.8 https://github.com/aldryn/aldryn-apphooks-config/archive/master.zip https://github.com/nephila/djangocms-apphook-setup/archive/master.zip From cac615af85977ab412bc41a9aab02dcbfd3ddb09 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Wed, 10 Feb 2016 10:06:40 +0100 Subject: [PATCH 38/69] Use all_languages_column from parler 1.5, bump deps accordingly --- djangocms_blog/admin.py | 4 +++- setup.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/djangocms_blog/admin.py b/djangocms_blog/admin.py index c2fa423..99df7c8 100755 --- a/djangocms_blog/admin.py +++ b/djangocms_blog/admin.py @@ -25,6 +25,7 @@ except ImportError: class BlogCategoryAdmin(EnhancedModelAdminMixin, ModelAppHookConfig, TranslatableAdmin): + def get_prepopulated_fields(self, request, obj=None): app_config_default = self._app_config_select(request, obj) if app_config_default is None and request.method == 'GET': @@ -41,7 +42,8 @@ class PostAdmin(PlaceholderAdminMixin, FrontendEditableAdminMixin, ModelAppHookConfig, TranslatableAdmin): form = PostAdminForm list_display = [ - 'title', 'author', 'date_published', 'app_config', 'languages', 'date_published_end' + 'title', 'author', 'date_published', 'app_config', 'all_languages_column', + 'date_published_end' ] list_filter = ('app_config',) date_hierarchy = 'date_published' diff --git a/setup.py b/setup.py index 8f92519..ee00b55 100755 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ setup( ], include_package_data=True, install_requires=[ - 'django-parler>=1.2', + 'django-parler>=1.5', 'django-cms>3.0.11', 'django-taggit>=0.12.2', 'django-filer', From 9e315d47216c6c95a8956fce386a37e6646c67e0 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Wed, 10 Feb 2016 10:10:09 +0100 Subject: [PATCH 39/69] Edit history --- HISTORY.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/HISTORY.rst b/HISTORY.rst index 5149e65..0bcac81 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -8,6 +8,7 @@ History * Make categories non required * Fix tests with parler>=1.6 +* Use all_languages_column to admin 0.6.3 (2015-12-22) ++++++++++++++++++ From 9bc5e5c4e660b31234fe1006a3fa794a288b6c99 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Wed, 10 Feb 2016 21:56:28 +0100 Subject: [PATCH 40/69] Update README --- README.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index f21450d..76cfb03 100644 --- a/README.rst +++ b/README.rst @@ -190,12 +190,17 @@ suited for your deployment. `Auto setup `_: * Create a new django CMS page - * Go to Advanced settings and select Blog from the Application selector and - create an application configuration; + * Go to **Advanced settings** and select Blog from the **Application** selector and + create an **Application configuration**; * Eventually customise the Application instance name; * Publish the page * Restart the project instance to properly load blog urls. +.. warning:: After adding the apphook to the page you **cannot** change the **Instance Namspace** + field for the defined **AppHokConfig**; if you want to change it, create a new one + with the correct namespace, go in the CMS page **Advanced settings** and switch to the + new **Application configuration** + * Add and edit blog by creating them in the admin or using the toolbar, and the use the `django CMS frontend editor `_ to edit the blog content: From fcc9d3ace1e8476bef1863a47651e80a0b1595e6 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Thu, 11 Feb 2016 19:25:05 +0100 Subject: [PATCH 41/69] add publish button to the toolbar --- HISTORY.rst | 3 ++- djangocms_blog/admin.py | 26 +++++++++++++++++++++++++- djangocms_blog/cms_toolbar.py | 16 ++++++++++++++++ 3 files changed, 43 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 0bcac81..b7f7856 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,12 +3,13 @@ History ------- -0.6.4 (unreleased) +0.7.0 (unreleased) ++++++++++++++++++ * Make categories non required * Fix tests with parler>=1.6 * Use all_languages_column to admin +* Add publish button 0.6.3 (2015-12-22) ++++++++++++++++++ diff --git a/djangocms_blog/admin.py b/djangocms_blog/admin.py index 99df7c8..d811d73 100755 --- a/djangocms_blog/admin.py +++ b/djangocms_blog/admin.py @@ -7,9 +7,12 @@ from aldryn_apphooks_config.admin import BaseAppHookConfig, ModelAppHookConfig from cms.admin.placeholderadmin import FrontendEditableAdminMixin, PlaceholderAdminMixin from django import forms from django.conf import settings +from django.conf.urls import url from django.contrib import admin +from django.core.urlresolvers import reverse, resolve +from django.http import HttpResponseRedirect from django.utils.six import callable -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import ugettext_lazy as _, get_language_from_request from parler.admin import TranslatableAdmin from .cms_appconfig import BlogConfig @@ -73,6 +76,27 @@ class PostAdmin(PlaceholderAdminMixin, FrontendEditableAdminMixin, 'default_published': 'publish' } + def get_urls(self): + urls = [ + url(r'^publish/([0-9]+)/$', self.admin_site.admin_view(self.publish_post), + name='djangocms_blog_publish_article'), + ] + urls.extend(super(PostAdmin, self).get_urls()) + return urls + + def publish_post(self, request, pk): + language = get_language_from_request(request, check_path=True) + try: + post = Post.objects.get(pk=int(pk)) + post.publish = True + post.save() + return HttpResponseRedirect(post.get_absolute_url(language)) + except Exception: + try: + return HttpResponseRedirect(request.META['HTTP_REFERER']) + except KeyError: + return HttpResponseRedirect(reverse('djangocms_blog:posts-latest')) + def languages(self, obj): return ','.join(obj.get_available_languages()) diff --git a/djangocms_blog/cms_toolbar.py b/djangocms_blog/cms_toolbar.py index b5d5d85..9892ed5 100644 --- a/djangocms_blog/cms_toolbar.py +++ b/djangocms_blog/cms_toolbar.py @@ -3,6 +3,8 @@ from __future__ import absolute_import, print_function, unicode_literals from cms.toolbar_base import CMSToolbar from cms.toolbar_pool import toolbar_pool +from cms.utils.i18n import force_language +from cms.utils.urlutils import admin_reverse, add_url_parameters from django.core.urlresolvers import reverse from django.utils.translation import override, ugettext_lazy as _ @@ -33,6 +35,19 @@ class BlogToolbar(CMSToolbar): 'admin:djangocms_blog_post_change', args=(current_post.pk,)), active=True) + def add_publish_button(self): + current_post = getattr(self.request, get_setting('CURRENT_POST_IDENTIFIER'), None) + if (self.toolbar.edit_mode and current_post and + not current_post.publish and + self.request.user.has_perm('djangocms_blog.change_post') + ): # pragma: no cover # NOQA + classes = ['cms-btn-action', 'blog-publish'] + title = _('Publish {0} now').format(current_post.app_config.object_name) + + url = admin_reverse('djangocms_blog_publish_article', args=(current_post.pk,)) + + self.toolbar.add_button(title, url=url, extra_classes=classes, side=self.toolbar.RIGHT) + def post_template_populate(self): current_post = getattr(self.request, get_setting('CURRENT_POST_IDENTIFIER'), None) if current_post and self.request.user.has_perm('djangocms_blog.change_post'): # pragma: no cover # NOQA @@ -52,3 +67,4 @@ class BlogToolbar(CMSToolbar): menu.remove_item(pagetags) except ImportError: pass + self.add_publish_button() From 33d2371647fc86071484b081506cd9c8a6133335 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Thu, 11 Feb 2016 23:02:20 +0100 Subject: [PATCH 42/69] Cleanup code --- djangocms_blog/admin.py | 4 ++-- djangocms_blog/cms_toolbar.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/djangocms_blog/admin.py b/djangocms_blog/admin.py index d811d73..fc68837 100755 --- a/djangocms_blog/admin.py +++ b/djangocms_blog/admin.py @@ -9,10 +9,10 @@ from django import forms from django.conf import settings from django.conf.urls import url from django.contrib import admin -from django.core.urlresolvers import reverse, resolve +from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.utils.six import callable -from django.utils.translation import ugettext_lazy as _, get_language_from_request +from django.utils.translation import get_language_from_request, ugettext_lazy as _ from parler.admin import TranslatableAdmin from .cms_appconfig import BlogConfig diff --git a/djangocms_blog/cms_toolbar.py b/djangocms_blog/cms_toolbar.py index 9892ed5..00a3157 100644 --- a/djangocms_blog/cms_toolbar.py +++ b/djangocms_blog/cms_toolbar.py @@ -3,8 +3,7 @@ from __future__ import absolute_import, print_function, unicode_literals from cms.toolbar_base import CMSToolbar from cms.toolbar_pool import toolbar_pool -from cms.utils.i18n import force_language -from cms.utils.urlutils import admin_reverse, add_url_parameters +from cms.utils.urlutils import admin_reverse from django.core.urlresolvers import reverse from django.utils.translation import override, ugettext_lazy as _ From 1b42655d97824ad9d7f953bc26e40e33a2e88575 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Fri, 12 Feb 2016 07:42:58 +0100 Subject: [PATCH 43/69] Add toolbar test for publish button --- tests/test_toolbar.py | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/tests/test_toolbar.py b/tests/test_toolbar.py index 90b6ccb..e3bc069 100644 --- a/tests/test_toolbar.py +++ b/tests/test_toolbar.py @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals -from cms.toolbar.items import ModalItem +from cms.toolbar.items import ButtonList, ModalItem from django.core.urlresolvers import reverse +from django.utils.encoding import force_text from djangocms_blog.models import BLOG_CURRENT_POST_IDENTIFIER @@ -20,9 +21,39 @@ class ToolbarTest(BaseTest): pages = self.get_pages() request = self.get_page_request(pages[0], self.user, r'/en/blog/', edit=True) setattr(request, BLOG_CURRENT_POST_IDENTIFIER, posts[0]) + + posts[0].publish = False + posts[0].save() toolbar = CMSToolbar(request) + toolbar.populate() + toolbar.post_template_populate() toolbar.get_left_items() blog_menu = toolbar.menus['djangocms_blog'] self.assertEqual(len(blog_menu.find_items(ModalItem, url=reverse('admin:djangocms_blog_post_changelist'))), 1) self.assertEqual(len(blog_menu.find_items(ModalItem, url=reverse('admin:djangocms_blog_post_add'))), 1) self.assertEqual(len(blog_menu.find_items(ModalItem, url=reverse('admin:djangocms_blog_post_change', args=(posts[0].pk,)))), 1) + + # Publish button only appears if current post is unpublished + right = toolbar.get_right_items() + buttons = sum([item.buttons for item in right if isinstance(item, ButtonList)], []) + self.assertTrue([button for button in buttons if force_text(button.name) == 'Publish Blog now']) + + # Publish button does not appears if current post is published + posts[0].publish = True + posts[0].save() + toolbar = CMSToolbar(request) + toolbar.populate() + toolbar.post_template_populate() + right = toolbar.get_right_items() + buttons = sum([item.buttons for item in right if isinstance(item, ButtonList)], []) + self.assertFalse([button for button in buttons if force_text(button.name) == 'Publish Blog now']) + + # Publish button does not appears if other posts but the current one are unpublished + posts[1].publish = True + posts[1].save() + toolbar = CMSToolbar(request) + toolbar.populate() + toolbar.post_template_populate() + right = toolbar.get_right_items() + buttons = sum([item.buttons for item in right if isinstance(item, ButtonList)], []) + self.assertFalse([button for button in buttons if force_text(button.name) == 'Publish Blog now']) From 094525326ffc4cbc7aff38239c67f7e739f1dd18 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Fri, 12 Feb 2016 07:55:10 +0100 Subject: [PATCH 44/69] Add admin test for publish view --- tests/test_models.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tests/test_models.py b/tests/test_models.py index fcce681..ab8977d 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -34,6 +34,8 @@ class AdminTest(BaseTest): admin.autodiscover() def test_admin_post_views(self): + self.get_pages() + post_admin = admin.site._registry[Post] request = self.get_page_request('/', self.user, r'/en/blog/', edit=False) @@ -50,6 +52,28 @@ class AdminTest(BaseTest): self.assertContains(response, '') self.assertContains(response, '' % self.app_config_1.pk) + # Test for publish view + post.publish = False + post.save() + response = post_admin.publish_post(request, str(post.pk)) + # Redirects to current post + self.assertEqual(response.status_code, 302) + self.assertEqual(response['Location'], post.get_absolute_url()) + post = self.reload_model(post) + # post is publshed + self.assertTrue(post.publish) + + # Non-existing post is redirected to posts list + response = post_admin.publish_post(request, str('1000000')) + self.assertEqual(response.status_code, 302) + self.assertEqual(response['Location'], reverse('djangocms_blog:posts-latest')) + + # unless a referer is set + request.META['HTTP_REFERER'] = '/' + response = post_admin.publish_post(request, str('1000000')) + self.assertEqual(response.status_code, 302) + self.assertEqual(response['Location'], '/') + def test_admin_blogconfig_views(self): post_admin = admin.site._registry[BlogConfig] request = self.get_page_request('/', self.user, r'/en/blog/', edit=False) From 34039bea6fdc5bd3dd6e992cd4dd023b7df8e453 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Fri, 12 Feb 2016 08:02:23 +0100 Subject: [PATCH 45/69] Add docstrings --- djangocms_blog/admin.py | 21 ++++++++++++++++++--- djangocms_blog/cms_toolbar.py | 3 +++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/djangocms_blog/admin.py b/djangocms_blog/admin.py index fc68837..e48f3f6 100755 --- a/djangocms_blog/admin.py +++ b/djangocms_blog/admin.py @@ -77,6 +77,9 @@ class PostAdmin(PlaceholderAdminMixin, FrontendEditableAdminMixin, } def get_urls(self): + """ + Customize the modeladmin urls + """ urls = [ url(r'^publish/([0-9]+)/$', self.admin_site.admin_view(self.publish_post), name='djangocms_blog_publish_article'), @@ -85,6 +88,12 @@ class PostAdmin(PlaceholderAdminMixin, FrontendEditableAdminMixin, return urls def publish_post(self, request, pk): + """ + Admin view to publish a single post + :param request: request + :param pk: primary key of the post to publish + :return: Redirect to the post itself (if found) or fallback urls + """ language = get_language_from_request(request, check_path=True) try: post = Post.objects.get(pk=int(pk)) @@ -97,9 +106,6 @@ class PostAdmin(PlaceholderAdminMixin, FrontendEditableAdminMixin, except KeyError: return HttpResponseRedirect(reverse('djangocms_blog:posts-latest')) - def languages(self, obj): - return ','.join(obj.get_available_languages()) - def formfield_for_dbfield(self, db_field, **kwargs): field = super(PostAdmin, self).formfield_for_dbfield(db_field, **kwargs) if db_field.name == 'meta_description': @@ -111,6 +117,12 @@ class PostAdmin(PlaceholderAdminMixin, FrontendEditableAdminMixin, return field def get_fieldsets(self, request, obj=None): + """ + Customize the fieldsets according to the app settings + :param request: request + :param obj: post + :return: fieldsets configuration + """ app_config_default = self._app_config_select(request, obj) if app_config_default is None and request.method == 'GET': return super(PostAdmin, self).get_fieldsets(request, obj) @@ -156,6 +168,9 @@ class BlogConfigAdmin(BaseAppHookConfig, TranslatableAdmin): @property def declared_fieldsets(self): + """ + Fieldsets configuration + """ return [ (None, { 'fields': ('type', 'namespace', 'app_title', 'object_name') diff --git a/djangocms_blog/cms_toolbar.py b/djangocms_blog/cms_toolbar.py index 00a3157..7dfd2cc 100644 --- a/djangocms_blog/cms_toolbar.py +++ b/djangocms_blog/cms_toolbar.py @@ -35,6 +35,9 @@ class BlogToolbar(CMSToolbar): active=True) def add_publish_button(self): + """ + Adds the publish button to the toolbar if the current post is unpublished + """ current_post = getattr(self.request, get_setting('CURRENT_POST_IDENTIFIER'), None) if (self.toolbar.edit_mode and current_post and not current_post.publish and From 701454bdd235e2e562e72563322757d148ff7d27 Mon Sep 17 00:00:00 2001 From: Tadas Dailyda Date: Mon, 15 Feb 2016 12:13:36 +0200 Subject: [PATCH 46/69] fix migration 0007 to use swappable dependency --- djangocms_blog/migrations/0007_auto_20150719_0933.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/djangocms_blog/migrations/0007_auto_20150719_0933.py b/djangocms_blog/migrations/0007_auto_20150719_0933.py index 7b62d62..2594331 100644 --- a/djangocms_blog/migrations/0007_auto_20150719_0933.py +++ b/djangocms_blog/migrations/0007_auto_20150719_0933.py @@ -1,18 +1,20 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals -from django.db import models, migrations -import filer.fields.image -import django.utils.timezone -from django.conf import settings -import djangocms_text_ckeditor.fields import django.db.models.deletion +import django.utils.timezone +import djangocms_text_ckeditor.fields +import filer.fields.image +from django.conf import settings +from django.db import migrations, models +from filer.settings import FILER_IMAGE_MODEL class Migration(migrations.Migration): dependencies = [ ('djangocms_blog', '0006_auto_20150214_1907'), + migrations.swappable_dependency(FILER_IMAGE_MODEL), ] operations = [ From 678bd1ab9b806bdf6e7e0139209f02e62b97c085 Mon Sep 17 00:00:00 2001 From: Tadas Dailyda Date: Mon, 15 Feb 2016 13:53:06 +0200 Subject: [PATCH 47/69] remove data migration from 0010, create 0014 with optional data migration (does nothing if already migrated) --- .../migrations/0010_auto_20150923_1151.py | 29 ------------- .../migrations/0014_auto_20160215_1331.py | 43 +++++++++++++++++++ 2 files changed, 43 insertions(+), 29 deletions(-) create mode 100644 djangocms_blog/migrations/0014_auto_20160215_1331.py diff --git a/djangocms_blog/migrations/0010_auto_20150923_1151.py b/djangocms_blog/migrations/0010_auto_20150923_1151.py index 1b541d3..fa01b5f 100644 --- a/djangocms_blog/migrations/0010_auto_20150923_1151.py +++ b/djangocms_blog/migrations/0010_auto_20150923_1151.py @@ -4,37 +4,9 @@ from __future__ import unicode_literals import aldryn_apphooks_config.fields import app_data.fields import djangocms_text_ckeditor.fields -from cms.models import Page -from cms.utils.i18n import get_language_list from django.db import models, migrations -def forwards(apps, schema_editor): - BlogConfig = apps.get_model('djangocms_blog', 'BlogConfig') - BlogConfigTranslation = apps.get_model('djangocms_blog', 'BlogConfigTranslation') - Post = apps.get_model('djangocms_blog', 'Post') - BlogCategory = apps.get_model('djangocms_blog', 'BlogCategory') - GenericBlogPlugin = apps.get_model('djangocms_blog', 'GenericBlogPlugin') - LatestPostsPlugin = apps.get_model('djangocms_blog', 'LatestPostsPlugin') - AuthorEntriesPlugin = apps.get_model('djangocms_blog', 'AuthorEntriesPlugin') - config = None - for page in Page.objects.drafts().filter(application_urls='BlogApp'): - config = BlogConfig.objects.create(namespace=page.application_namespace) - for lang in get_language_list(): - title = page.get_title(lang) - translation = BlogConfigTranslation.objects.create(language_code=lang, master_id=config.pk, app_title=title) - if config: - for model in (Post, BlogCategory, GenericBlogPlugin, LatestPostsPlugin, AuthorEntriesPlugin): - for item in model.objects.all(): - item.app_config = config - item.save() - - -def backwards(apps, schema_editor): - # No need for backward data migration - pass - - class Migration(migrations.Migration): dependencies = [ @@ -120,5 +92,4 @@ class Migration(migrations.Migration): name='sites', field=models.ManyToManyField(to='sites.Site', help_text='Select sites in which to show the post. If none is set it will be visible in all the configured sites.', blank=True, verbose_name='Site(s)'), ), - migrations.RunPython(forwards, backwards) ] diff --git a/djangocms_blog/migrations/0014_auto_20160215_1331.py b/djangocms_blog/migrations/0014_auto_20160215_1331.py new file mode 100644 index 0000000..fc0a231 --- /dev/null +++ b/djangocms_blog/migrations/0014_auto_20160215_1331.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from cms.models import Page +from cms.utils.i18n import get_language_list +from django.db import migrations, models + + +def forwards(apps, schema_editor): + BlogConfig = apps.get_model('djangocms_blog', 'BlogConfig') + BlogConfigTranslation = apps.get_model('djangocms_blog', 'BlogConfigTranslation') + Post = apps.get_model('djangocms_blog', 'Post') + BlogCategory = apps.get_model('djangocms_blog', 'BlogCategory') + GenericBlogPlugin = apps.get_model('djangocms_blog', 'GenericBlogPlugin') + LatestPostsPlugin = apps.get_model('djangocms_blog', 'LatestPostsPlugin') + AuthorEntriesPlugin = apps.get_model('djangocms_blog', 'AuthorEntriesPlugin') + config = None + for page in Page.objects.drafts().filter(application_urls='BlogApp'): + config, created = BlogConfig.objects.get_or_create(namespace=page.application_namespace) + if not BlogConfigTranslation.objects.exists(): + for lang in get_language_list(): + title = page.get_title(lang) + translation = BlogConfigTranslation.objects.create(language_code=lang, master_id=config.pk, app_title=title) + if config: + for model in (Post, BlogCategory, GenericBlogPlugin, LatestPostsPlugin, AuthorEntriesPlugin): + for item in model.objects.filter(app_config__isnull=True): + item.app_config = config + item.save() + + +def backwards(apps, schema_editor): + # No need for backward data migration + pass + +class Migration(migrations.Migration): + + dependencies = [ + ('djangocms_blog', '0013_auto_20160201_2235'), + ] + + operations = [ + migrations.RunPython(forwards, backwards), + ] From 453adeb5bdf4c032fe1a9438ad4d254c04e2d24a Mon Sep 17 00:00:00 2001 From: Tadas Dailyda Date: Mon, 15 Feb 2016 14:55:12 +0200 Subject: [PATCH 48/69] also fix migration 0001 and 0004, be aware that FILER_IMAGE_MODEL is False by default --- djangocms_blog/migrations/0001_initial.py | 8 ++++++-- djangocms_blog/migrations/0004_auto_20150108_1435.py | 10 +++++++--- djangocms_blog/migrations/0007_auto_20150719_0933.py | 6 ++++-- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/djangocms_blog/migrations/0001_initial.py b/djangocms_blog/migrations/0001_initial.py index 3e993ba..e581f14 100644 --- a/djangocms_blog/migrations/0001_initial.py +++ b/djangocms_blog/migrations/0001_initial.py @@ -8,13 +8,17 @@ import filer.fields.image import meta_mixin.models import taggit_autosuggest.managers from django.conf import settings -from django.db import models, migrations +from django.db import migrations, models +from filer.settings import FILER_IMAGE_MODEL + +ACTUAL_FILER_IMAGE_MODEL = FILER_IMAGE_MODEL or 'filer.Image' class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), + migrations.swappable_dependency(ACTUAL_FILER_IMAGE_MODEL), ('cms', '__latest__'), ('taggit', '__latest__'), ('filer', '__latest__'), @@ -90,7 +94,7 @@ class Migration(migrations.Migration): ('author', models.ForeignKey(related_name='djangocms_blog_post_author', verbose_name='Author', blank=True, to=settings.AUTH_USER_MODEL, null=True)), ('categories', models.ManyToManyField(related_name='blog_posts', verbose_name='category', to='djangocms_blog.BlogCategory')), ('content', cms.models.fields.PlaceholderField(slotname='post_content', editable=False, to='cms.Placeholder', null=True)), - ('main_image', filer.fields.image.FilerImageField(related_name='djangocms_blog_post_image', verbose_name='Main image', blank=True, to='filer.Image', null=True)), + ('main_image', filer.fields.image.FilerImageField(related_name='djangocms_blog_post_image', verbose_name='Main image', blank=True, to=ACTUAL_FILER_IMAGE_MODEL, null=True)), ('main_image_full', models.ForeignKey(related_name='djangocms_blog_post_full', verbose_name='Main image full', blank=True, to='cmsplugin_filer_image.ThumbnailOption', null=True)), ('main_image_thumbnail', models.ForeignKey(related_name='djangocms_blog_post_thumbnail', verbose_name='Main image thumbnail', blank=True, to='cmsplugin_filer_image.ThumbnailOption', null=True)), ('tags', taggit_autosuggest.managers.TaggableManager(to='taggit.Tag', through='taggit.TaggedItem', blank=True, help_text='A comma-separated list of tags.', verbose_name='Tags')), diff --git a/djangocms_blog/migrations/0004_auto_20150108_1435.py b/djangocms_blog/migrations/0004_auto_20150108_1435.py index 8bfa4b4..79e727f 100644 --- a/djangocms_blog/migrations/0004_auto_20150108_1435.py +++ b/djangocms_blog/migrations/0004_auto_20150108_1435.py @@ -1,14 +1,18 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals -from django.db import models, migrations -import filer.fields.image import django.db.models.deletion +import filer.fields.image +from django.db import migrations, models +from filer.settings import FILER_IMAGE_MODEL + +ACTUAL_FILER_IMAGE_MODEL = FILER_IMAGE_MODEL or 'filer.Image' class Migration(migrations.Migration): dependencies = [ + migrations.swappable_dependency(ACTUAL_FILER_IMAGE_MODEL), ('djangocms_blog', '0003_auto_20141201_2252'), ] @@ -16,7 +20,7 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='post', name='main_image', - field=filer.fields.image.FilerImageField(related_name='djangocms_blog_post_image', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Main image', blank=True, to='filer.Image', null=True), + field=filer.fields.image.FilerImageField(related_name='djangocms_blog_post_image', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Main image', blank=True, to=ACTUAL_FILER_IMAGE_MODEL, null=True), preserve_default=True, ), migrations.AlterField( diff --git a/djangocms_blog/migrations/0007_auto_20150719_0933.py b/djangocms_blog/migrations/0007_auto_20150719_0933.py index 2594331..b305433 100644 --- a/djangocms_blog/migrations/0007_auto_20150719_0933.py +++ b/djangocms_blog/migrations/0007_auto_20150719_0933.py @@ -9,12 +9,14 @@ from django.conf import settings from django.db import migrations, models from filer.settings import FILER_IMAGE_MODEL +ACTUAL_FILER_IMAGE_MODEL = FILER_IMAGE_MODEL or 'filer.Image' + class Migration(migrations.Migration): dependencies = [ ('djangocms_blog', '0006_auto_20150214_1907'), - migrations.swappable_dependency(FILER_IMAGE_MODEL), + migrations.swappable_dependency(ACTUAL_FILER_IMAGE_MODEL), ] operations = [ @@ -101,7 +103,7 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='post', name='main_image', - field=filer.fields.image.FilerImageField(on_delete=django.db.models.deletion.SET_NULL, blank=True, verbose_name='main image', to='filer.Image', related_name='djangocms_blog_post_image', null=True), + field=filer.fields.image.FilerImageField(on_delete=django.db.models.deletion.SET_NULL, blank=True, verbose_name='main image', to=ACTUAL_FILER_IMAGE_MODEL, related_name='djangocms_blog_post_image', null=True), preserve_default=True, ), migrations.AlterField( From dc24c12dee5bf66bf9b6d9bc21911e1f6a078b25 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Mon, 15 Feb 2016 19:37:57 +0100 Subject: [PATCH 49/69] Add migrations to .checkignore --- .checkignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.checkignore b/.checkignore index 658579c..8005a6e 100644 --- a/.checkignore +++ b/.checkignore @@ -1,3 +1,4 @@ tests/* docs/* djangocms_blog/south_migrations/* +djangocms_blog/migrations/* From c71fb4e534eb15a9ce6993d1c273819b45699409 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Mon, 15 Feb 2016 19:44:32 +0100 Subject: [PATCH 50/69] Update history --- HISTORY.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/HISTORY.rst b/HISTORY.rst index b7f7856..76ae54f 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -10,6 +10,7 @@ History * Fix tests with parler>=1.6 * Use all_languages_column to admin * Add publish button +* Fix issues in migrations. Thanks @skirsdeda 0.6.3 (2015-12-22) ++++++++++++++++++ From 2588f6c020210a5cd1620e558c0c3129372f0d01 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Mon, 15 Feb 2016 20:33:17 +0100 Subject: [PATCH 51/69] Fix selecting current menu item according to menu layout --- HISTORY.rst | 1 + djangocms_blog/menu.py | 54 ++++++++++++++++++++++++++++++++++++++++-- tests/test_menu.py | 31 ++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 76ae54f..6fda271 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -11,6 +11,7 @@ History * Use all_languages_column to admin * Add publish button * Fix issues in migrations. Thanks @skirsdeda +* Fix selecting current menu item according to menu layout 0.6.3 (2015-12-22) ++++++++++++++++++ diff --git a/djangocms_blog/menu.py b/djangocms_blog/menu.py index 8d7920f..22660a8 100644 --- a/djangocms_blog/menu.py +++ b/djangocms_blog/menu.py @@ -1,21 +1,34 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals +from cms.apphook_pool import apphook_pool from cms.menu_bases import CMSAttachMenu +from django.core.urlresolvers import resolve from django.db.models.signals import post_delete, post_save from django.utils.translation import get_language_from_request, ugettext_lazy as _ -from menus.base import NavigationNode +from menus.base import Modifier, NavigationNode from menus.menu_pool import menu_pool from .cms_appconfig import BlogConfig from .models import BlogCategory, Post -from .settings import MENU_TYPE_CATEGORIES, MENU_TYPE_COMPLETE, MENU_TYPE_POSTS +from .settings import MENU_TYPE_CATEGORIES, MENU_TYPE_COMPLETE, MENU_TYPE_POSTS, get_setting class BlogCategoryMenu(CMSAttachMenu): + """ + Main menu class + + Handles all types of blog menu + """ name = _('Blog menu') def get_nodes(self, request): + """ + Generates the nodelist + + :param request: + :return: list of nodes + """ nodes = [] language = get_language_from_request(request, check_path=True) @@ -75,7 +88,44 @@ class BlogCategoryMenu(CMSAttachMenu): menu_pool.register_menu(BlogCategoryMenu) +class BlogNavModifier(Modifier): + """ + This navigation modifier makes sure that when + a particular blog post is viewed, + a corresponding category is selected in menu + """ + def modify(self, request, nodes, namespace, root_id, post_cut, breadcrumb): + app = None + config = None + if getattr(request, 'current_page', None) and request.current_page.application_urls: + app = apphook_pool.get_apphook(request.current_page.application_urls) + + if app and app.app_config: + namespace = resolve(request.path).namespace + config = app.get_config(namespace) + if config and config.menu_structure != MENU_TYPE_CATEGORIES: + return nodes + if post_cut: + return nodes + current_post = getattr(request, get_setting('CURRENT_POST_IDENTIFIER'), None) + category = None + if current_post and current_post.__class__ == Post: + category = current_post.categories.first() + if not category: + return nodes + + for node in nodes: + if '%s-%s' % (category.__class__.__name__, category.pk) == node.id: + node.selected = True + return nodes + +menu_pool.register_modifier(BlogNavModifier) + + def clear_menu_cache(**kwargs): + """ + Empty menu cache when saving categories + """ menu_pool.clear(all=True) post_save.connect(clear_menu_cache, sender=BlogCategory) diff --git a/tests/test_menu.py b/tests/test_menu.py index 0f9f046..83980d2 100644 --- a/tests/test_menu.py +++ b/tests/test_menu.py @@ -29,6 +29,7 @@ class MenuTest(BaseTest): self.cats.append(cat) activate('en') + menu_pool.clear(all=True) menu_pool.discover_menus() # All cms menu modifiers should be removed from menu_pool.modifiers # so that they do not interfere with our menu nodes @@ -139,6 +140,10 @@ class MenuTest(BaseTest): (PostDetailView, 'slug', posts[0], posts[0].categories.first()), (CategoryEntriesView, 'category', self.cats[2], self.cats[2]) ) + menu_pool.clear(all=True) + cache.clear() + self.app_config_1.app_data.config.menu_structure = MENU_TYPE_COMPLETE + self.app_config_1.save() for view_cls, kwarg, obj, cat in tests: request = self.get_page_request(pages[1], self.user, path=obj.get_absolute_url()) with smart_override('en'): @@ -149,6 +154,7 @@ class MenuTest(BaseTest): view_obj.app_config = self.app_config_1 view_obj.kwargs = {kwarg: obj.slug} view_obj.get(request) + view_obj.get_context_data() # check if selected menu node points to cat nodes = menu_pool.get_nodes(request) found = False @@ -158,3 +164,28 @@ class MenuTest(BaseTest): found = True break self.assertTrue(found) + + menu_pool.clear(all=True) + cache.clear() + self.app_config_1.app_data.config.menu_structure = MENU_TYPE_CATEGORIES + self.app_config_1.save() + for view_cls, kwarg, obj, cat in tests: + request = self.get_page_request(pages[1], self.user, path=obj.get_absolute_url()) + with smart_override('en'): + with switch_language(obj, 'en'): + view_obj = view_cls() + view_obj.request = request + view_obj.namespace, view_obj.config = get_app_instance(request) + view_obj.app_config = self.app_config_1 + view_obj.kwargs = {kwarg: obj.slug} + view_obj.get(request) + view_obj.get_context_data() + # check if selected menu node points to cat + nodes = menu_pool.get_nodes(request) + found = False + for node in nodes: + if node.selected: + self.assertEqual(node.url, cat.get_absolute_url()) + found = True + break + self.assertTrue(found) From e5a070bc94c45e35c56f507cc3ba6997049591d0 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Mon, 15 Feb 2016 20:37:07 +0100 Subject: [PATCH 52/69] Fix string formatting --- djangocms_blog/menu.py | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/djangocms_blog/menu.py b/djangocms_blog/menu.py index 22660a8..6be7aad 100644 --- a/djangocms_blog/menu.py +++ b/djangocms_blog/menu.py @@ -53,9 +53,12 @@ class BlogCategoryMenu(CMSAttachMenu): node = NavigationNode( category.name, category.get_absolute_url(), - '%s-%s' % (category.__class__.__name__, category.pk), - ('%s-%s' % (category.__class__.__name__, category.parent.id) if category.parent - else None) + '{0}-{1}'.format(category.__class__.__name__, category.pk), + ( + '{0}-{1}'.format( + category.__class__.__name__, category.parent.id + ) if category.parent else None + ) ) nodes.append(node) @@ -70,10 +73,10 @@ class BlogCategoryMenu(CMSAttachMenu): if categories_menu: category = post.categories.first() if category: - parent = '%s-%s' % (category.__class__.__name__, category.pk) - post_id = '%s-%s' % (post.__class__.__name__, post.pk), + parent = '{0}-{1}'.format(category.__class__.__name__, category.pk) + post_id = '{0}-{1}'.format(post.__class__.__name__, post.pk), else: - post_id = '%s-%s' % (post.__class__.__name__, post.pk), + post_id = '{0}-{1}'.format(post.__class__.__name__, post.pk), if post_id: node = NavigationNode( post.get_title(), @@ -95,6 +98,16 @@ class BlogNavModifier(Modifier): a corresponding category is selected in menu """ def modify(self, request, nodes, namespace, root_id, post_cut, breadcrumb): + """ + Actual modifier function + :param request: request + :param nodes: complete list of nodes + :param namespace: Menu namespace + :param root_id: eventual root_id + :param post_cut: flag for modifier stage + :param breadcrumb: flag for modifier stage + :return: nodeslist + """ app = None config = None if getattr(request, 'current_page', None) and request.current_page.application_urls: @@ -115,7 +128,7 @@ class BlogNavModifier(Modifier): return nodes for node in nodes: - if '%s-%s' % (category.__class__.__name__, category.pk) == node.id: + if '{0}-{1}'.format(category.__class__.__name__, category.pk) == node.id: node.selected = True return nodes From f79b6471c436132f6ac118257445f7c64128b824 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Mon, 15 Feb 2016 23:16:34 +0100 Subject: [PATCH 53/69] Fix test --- tests/test_menu.py | 35 +++++++++++++++++++---------------- tests/test_models.py | 2 +- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/tests/test_menu.py b/tests/test_menu.py index 83980d2..8247368 100644 --- a/tests/test_menu.py +++ b/tests/test_menu.py @@ -140,14 +140,16 @@ class MenuTest(BaseTest): (PostDetailView, 'slug', posts[0], posts[0].categories.first()), (CategoryEntriesView, 'category', self.cats[2], self.cats[2]) ) - menu_pool.clear(all=True) - cache.clear() self.app_config_1.app_data.config.menu_structure = MENU_TYPE_COMPLETE self.app_config_1.save() for view_cls, kwarg, obj, cat in tests: - request = self.get_page_request(pages[1], self.user, path=obj.get_absolute_url()) with smart_override('en'): with switch_language(obj, 'en'): + request = self.get_page_request( + pages[1], self.user, path=obj.get_absolute_url() + ) + cache.clear() + menu_pool.clear(all=True) view_obj = view_cls() view_obj.request = request view_obj.namespace, view_obj.config = get_app_instance(request) @@ -157,22 +159,22 @@ class MenuTest(BaseTest): view_obj.get_context_data() # check if selected menu node points to cat nodes = menu_pool.get_nodes(request) - found = False + found = [] for node in nodes: if node.selected: - self.assertEqual(node.url, obj.get_absolute_url()) - found = True - break - self.assertTrue(found) + found.append(node.get_absolute_url()) + self.assertTrue(obj.get_absolute_url() in found) - menu_pool.clear(all=True) - cache.clear() self.app_config_1.app_data.config.menu_structure = MENU_TYPE_CATEGORIES self.app_config_1.save() for view_cls, kwarg, obj, cat in tests: - request = self.get_page_request(pages[1], self.user, path=obj.get_absolute_url()) with smart_override('en'): with switch_language(obj, 'en'): + request = self.get_page_request( + pages[1], self.user, path=obj.get_absolute_url() + ) + cache.clear() + menu_pool.clear(all=True) view_obj = view_cls() view_obj.request = request view_obj.namespace, view_obj.config = get_app_instance(request) @@ -182,10 +184,11 @@ class MenuTest(BaseTest): view_obj.get_context_data() # check if selected menu node points to cat nodes = menu_pool.get_nodes(request) - found = False + found = [] for node in nodes: if node.selected: - self.assertEqual(node.url, cat.get_absolute_url()) - found = True - break - self.assertTrue(found) + found.append(node.get_absolute_url()) + self.assertTrue(cat.get_absolute_url() in found) + + self.app_config_1.app_data.config.menu_structure = MENU_TYPE_COMPLETE + self.app_config_1.save() diff --git a/tests/test_models.py b/tests/test_models.py index ab8977d..689e2ae 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -91,7 +91,7 @@ class AdminTest(BaseTest): for fieldname in BlogConfigForm.base_fields: self.assertContains(response, 'id="id_config-%s"' % fieldname) self.assertContains(response, '') - self.assertContains(response, '') + self.assertContains(response, 'sample_app') def test_admin_category_views(self): post_admin = admin.site._registry[BlogCategory] From 55bf32435b07f4824cc4fedfeed2bdaed3fc2a78 Mon Sep 17 00:00:00 2001 From: Tadas Dailyda Date: Mon, 15 Feb 2016 18:06:04 +0200 Subject: [PATCH 54/69] fix Post.get_keywords to handle empty keywords, cleanup search_indexes --- djangocms_blog/models.py | 2 +- djangocms_blog/search_indexes.py | 49 ++++++++++++++++---------------- tests/test_search.py | 8 ++++-- 3 files changed, 31 insertions(+), 28 deletions(-) diff --git a/djangocms_blog/models.py b/djangocms_blog/models.py index e0fa27e..d38b504 100644 --- a/djangocms_blog/models.py +++ b/djangocms_blog/models.py @@ -232,7 +232,7 @@ class Post(ModelMeta, TranslatableModel): return title.strip() def get_keywords(self): - return self.safe_translation_getter('meta_keywords').strip().split(',') + return self.safe_translation_getter('meta_keywords', default='').strip().split(',') def get_locale(self): return self.get_current_language() diff --git a/djangocms_blog/search_indexes.py b/djangocms_blog/search_indexes.py index 01baee9..9f56cae 100644 --- a/djangocms_blog/search_indexes.py +++ b/djangocms_blog/search_indexes.py @@ -15,12 +15,9 @@ class PostIndex(get_index_base()): author = indexes.CharField(indexed=True, model_attr='get_author') keywords = indexes.CharField(null=True) - tags = indexes.CharField(null=True) + tags = indexes.CharField(null=True, model_attr='get_tags') post_text = indexes.CharField(null=True) - def get_keywords(self, post): - return ','.join(post.get_keywords()) - def get_title(self, post): return post.safe_translation_getter('title') @@ -28,7 +25,7 @@ class PostIndex(get_index_base()): return post.get_description() def prepare_pub_date(self, post): - return post.date_published.strftime("%Y-%m-%d %H:%M:%S") + return post.date_published def index_queryset(self, using=None): self._get_backend(using) @@ -47,32 +44,36 @@ class PostIndex(get_index_base()): return Post def get_search_data(self, post, language, request): - optional_attributes = [] - abstract = post.safe_translation_getter('abstract') + description = post.get_description() + abstract = strip_tags(post.safe_translation_getter('abstract', default='')) + keywords = post.get_keywords() + text_bits = [post.get_title()] - text_bits.append(strip_tags(abstract)) - text_bits.append(post.get_description()) - text_bits.append(' '.join(post.get_keywords())) + if abstract: + text_bits.append(abstract) + if description: + text_bits.append(description) + if keywords: + text_bits.append(' '.join(keywords)) + self.prepared_data['keywords'] = ','.join(keywords) for category in post.categories.all(): text_bits.append( force_text(category.safe_translation_getter('name'))) for tag in post.tags.all(): text_bits.append(force_text(tag.name)) - if post.content: + + if get_setting('USE_PLACEHOLDER'): plugins = post.content.cmsplugin_set.filter(language=language) + content_bits = [] for base_plugin in plugins: content = get_plugin_index_data(base_plugin, request) - text_bits.append(' '.join(content)) - for attribute in optional_attributes: - value = force_text(getattr(post, attribute)) - if value and value not in text_bits: - text_bits.append(value) - return ' '.join(text_bits) + content_bits.append(' '.join(content)) + post_text = ' '.join(content_bits) + else: + post_text = post.safe_translation_getter('post_text') + if post_text: + post_text = strip_tags(post_text) + self.prepared_data['post_text'] = post_text + text_bits.append(post_text) - def prepare_fields(self, post, language, request): - super(PostIndex, self).prepare_fields(post, language, request) - data = [self.prepared_data['text']] - self.prepared_data['keywords'] = ' '.join(post.get_keywords()) - self.prepared_data['tags'] = ' '.join(post.get_tags()) - self.prepared_data['post_text'] = ' '.join(post.safe_translation_getter('post_text')) - self.prepared_data['text'] = ' '.join(data) + return ' '.join(text_bits) diff --git a/tests/test_search.py b/tests/test_search.py index cf30013..779ceec 100644 --- a/tests/test_search.py +++ b/tests/test_search.py @@ -28,12 +28,12 @@ class BlogIndexingTests(BaseTest): index.index_queryset(DEFAULT_ALIAS) # initialises index._backend_alias indexed = index.prepare(post) - self.assertEqual(post.get_title(), indexed['title']) self.assertEqual(post.get_description(), indexed['description']) + self.assertEqual(post.get_tags(), indexed['tags']) self.assertEqual(self.sample_text, indexed['text']) self.assertEqual(post.get_absolute_url(), indexed['url']) - #self.assertEqual(post.date_published.strftime("%Y-%m-%d %H:%M:%S"), indexed['pub_date']) + self.assertEqual(post.date_published, indexed['pub_date']) def test_blog_post_is_indexed_using_update_object(self): """This tests the indexing path way used by the RealTimeSignalProcessor""" @@ -44,13 +44,15 @@ class BlogIndexingTests(BaseTest): index = self.get_post_index() index.update_object(post, using=DEFAULT_ALIAS) + index = self.get_post_index() indexed = index.prepared_data self.assertEqual(post.get_title(), indexed['title']) self.assertEqual(post.get_description(), indexed['description']) + self.assertEqual(post.get_tags(), indexed['tags']) self.assertEqual(self.sample_text, indexed['text']) self.assertEqual(post.get_absolute_url(), indexed['url']) - #self.assertEqual(post.date_published.strftime("%Y-%m-%d %H:%M:%S"), indexed['pub_date']) + self.assertEqual(post.date_published, indexed['pub_date']) def test_searchqueryset(self): posts = self.get_posts() From a85cc1616f09d8e977c6277622d2c01ba29e5ae7 Mon Sep 17 00:00:00 2001 From: Tadas Dailyda Date: Tue, 16 Feb 2016 20:23:40 +0200 Subject: [PATCH 55/69] remove defunct test --- tests/test_search.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/tests/test_search.py b/tests/test_search.py index 779ceec..8d518ae 100644 --- a/tests/test_search.py +++ b/tests/test_search.py @@ -35,25 +35,6 @@ class BlogIndexingTests(BaseTest): self.assertEqual(post.get_absolute_url(), indexed['url']) self.assertEqual(post.date_published, indexed['pub_date']) - def test_blog_post_is_indexed_using_update_object(self): - """This tests the indexing path way used by the RealTimeSignalProcessor""" - post = self._get_post(self._post_data[0]['en']) - post = self._get_post(self._post_data[0]['it'], post, 'it') - post.tags.add('a tag') - add_plugin(post.content, 'TextPlugin', language='en', body='test body') - - index = self.get_post_index() - index.update_object(post, using=DEFAULT_ALIAS) - index = self.get_post_index() - indexed = index.prepared_data - - self.assertEqual(post.get_title(), indexed['title']) - self.assertEqual(post.get_description(), indexed['description']) - self.assertEqual(post.get_tags(), indexed['tags']) - self.assertEqual(self.sample_text, indexed['text']) - self.assertEqual(post.get_absolute_url(), indexed['url']) - self.assertEqual(post.date_published, indexed['pub_date']) - def test_searchqueryset(self): posts = self.get_posts() all_results = SearchQuerySet().models(Post) From f28a2cd6d106822ba7c761cd7a985d17eff6bda3 Mon Sep 17 00:00:00 2001 From: Tadas Dailyda Date: Wed, 17 Feb 2016 10:22:26 +0200 Subject: [PATCH 56/69] don't repeat blog title in search index twice --- djangocms_blog/search_indexes.py | 2 +- tests/test_search.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/djangocms_blog/search_indexes.py b/djangocms_blog/search_indexes.py index 9f56cae..49f9d9b 100644 --- a/djangocms_blog/search_indexes.py +++ b/djangocms_blog/search_indexes.py @@ -48,7 +48,7 @@ class PostIndex(get_index_base()): abstract = strip_tags(post.safe_translation_getter('abstract', default='')) keywords = post.get_keywords() - text_bits = [post.get_title()] + text_bits = [] if abstract: text_bits.append(abstract) if description: diff --git a/tests/test_search.py b/tests/test_search.py index 8d518ae..26f69d4 100644 --- a/tests/test_search.py +++ b/tests/test_search.py @@ -11,7 +11,7 @@ from .base import BaseTest class BlogIndexingTests(BaseTest): - sample_text = ('First post First post first line This is the description keyword1 ' + sample_text = ('First post first line This is the description keyword1 ' 'keyword2 category 1 a tag test body') def setUp(self): From d3f64ccdba20b3693c338b5691a7d9e2be0bd4f9 Mon Sep 17 00:00:00 2001 From: Tadas Dailyda Date: Fri, 19 Feb 2016 13:31:11 +0200 Subject: [PATCH 57/69] use post.get_title() to get fallback title from meta --- djangocms_blog/search_indexes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/djangocms_blog/search_indexes.py b/djangocms_blog/search_indexes.py index 49f9d9b..2e9c8d0 100644 --- a/djangocms_blog/search_indexes.py +++ b/djangocms_blog/search_indexes.py @@ -19,7 +19,7 @@ class PostIndex(get_index_base()): post_text = indexes.CharField(null=True) def get_title(self, post): - return post.safe_translation_getter('title') + return post.get_title() def get_description(self, post): return post.get_description() From cd4bc7aa8792fa317144048cf0c02537dba85da1 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Tue, 23 Feb 2016 21:38:55 +0100 Subject: [PATCH 58/69] Update changelog --- HISTORY.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/HISTORY.rst b/HISTORY.rst index 6fda271..a06c863 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -12,6 +12,7 @@ History * Add publish button * Fix issues in migrations. Thanks @skirsdeda * Fix selecting current menu item according to menu layout +* Fix some issues with haystack indexes 0.6.3 (2015-12-22) ++++++++++++++++++ From ed6d2cdda939d2d893188a42e66dd402599a423b Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Wed, 24 Feb 2016 23:29:12 +0100 Subject: [PATCH 59/69] Add support for moved ThumbnailOption --- HISTORY.rst | 1 + djangocms_blog/migrations/0001_initial.py | 5 +++-- .../migrations/0004_auto_20150108_1435.py | 5 +++-- .../migrations/0007_auto_20150719_0933.py | 5 +++-- djangocms_blog/models.py | 11 +++++++++-- djangocms_blog/south_migrations/0001_initial.py | 11 ++++++----- ...tion__del_unique_blogcategorytranslation_.py | 9 +++++---- .../south_migrations/0003_rename_plugins.py | 7 ++++--- ...dd_field_posttranslation_meta_description.py | 9 +++++---- ...__add_field_posttranslation_meta_keywords.py | 9 +++++---- ...0006_auto__add_field_post_enable_comments.py | 9 +++++---- ...auto__add_field_posttranslation_post_text.py | 9 +++++---- ...uto__add_field_posttranslation_meta_title.py | 9 +++++---- djangocms_blog/south_migrations/0009_auto.py | 9 +++++---- ...ge_full__chg_field_post_main_image__chg_f.py | 17 +++++++++-------- .../0011_chg_field_post_translation_abstract.py | 7 ++++--- .../south_migrations/0012_move_tags.py | 7 ++++--- djangocms_blog/south_migrations/0013_auto.py | 9 +++++---- ...add_blogconfig__add_blogconfigtranslation.py | 9 +++++---- .../south_migrations/0015_create_appconfig.py | 9 +++++---- ...d_field_blogconfigtranslation_object_name.py | 7 ++++--- 21 files changed, 100 insertions(+), 73 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index a06c863..9185927 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -13,6 +13,7 @@ History * Fix issues in migrations. Thanks @skirsdeda * Fix selecting current menu item according to menu layout * Fix some issues with haystack indexes +* Add support for moved ThumbnailOption 0.6.3 (2015-12-22) ++++++++++++++++++ diff --git a/djangocms_blog/migrations/0001_initial.py b/djangocms_blog/migrations/0001_initial.py index e581f14..24e53a0 100644 --- a/djangocms_blog/migrations/0001_initial.py +++ b/djangocms_blog/migrations/0001_initial.py @@ -9,6 +9,7 @@ import meta_mixin.models import taggit_autosuggest.managers from django.conf import settings from django.db import migrations, models +from djangocms_blog.models import thumbnail_model from filer.settings import FILER_IMAGE_MODEL ACTUAL_FILER_IMAGE_MODEL = FILER_IMAGE_MODEL or 'filer.Image' @@ -95,8 +96,8 @@ class Migration(migrations.Migration): ('categories', models.ManyToManyField(related_name='blog_posts', verbose_name='category', to='djangocms_blog.BlogCategory')), ('content', cms.models.fields.PlaceholderField(slotname='post_content', editable=False, to='cms.Placeholder', null=True)), ('main_image', filer.fields.image.FilerImageField(related_name='djangocms_blog_post_image', verbose_name='Main image', blank=True, to=ACTUAL_FILER_IMAGE_MODEL, null=True)), - ('main_image_full', models.ForeignKey(related_name='djangocms_blog_post_full', verbose_name='Main image full', blank=True, to='cmsplugin_filer_image.ThumbnailOption', null=True)), - ('main_image_thumbnail', models.ForeignKey(related_name='djangocms_blog_post_thumbnail', verbose_name='Main image thumbnail', blank=True, to='cmsplugin_filer_image.ThumbnailOption', null=True)), + ('main_image_full', models.ForeignKey(related_name='djangocms_blog_post_full', verbose_name='Main image full', blank=True, to=thumbnail_model, null=True)), + ('main_image_thumbnail', models.ForeignKey(related_name='djangocms_blog_post_thumbnail', verbose_name='Main image thumbnail', blank=True, to=thumbnail_model, null=True)), ('tags', taggit_autosuggest.managers.TaggableManager(to='taggit.Tag', through='taggit.TaggedItem', blank=True, help_text='A comma-separated list of tags.', verbose_name='Tags')), ], options={ diff --git a/djangocms_blog/migrations/0004_auto_20150108_1435.py b/djangocms_blog/migrations/0004_auto_20150108_1435.py index 79e727f..b316abd 100644 --- a/djangocms_blog/migrations/0004_auto_20150108_1435.py +++ b/djangocms_blog/migrations/0004_auto_20150108_1435.py @@ -4,6 +4,7 @@ from __future__ import unicode_literals import django.db.models.deletion import filer.fields.image from django.db import migrations, models +from djangocms_blog.models import thumbnail_model from filer.settings import FILER_IMAGE_MODEL ACTUAL_FILER_IMAGE_MODEL = FILER_IMAGE_MODEL or 'filer.Image' @@ -26,13 +27,13 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='post', name='main_image_full', - field=models.ForeignKey(related_name='djangocms_blog_post_full', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Main image full', blank=True, to='cmsplugin_filer_image.ThumbnailOption', null=True), + field=models.ForeignKey(related_name='djangocms_blog_post_full', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Main image full', blank=True, to=thumbnail_model, null=True), preserve_default=True, ), migrations.AlterField( model_name='post', name='main_image_thumbnail', - field=models.ForeignKey(related_name='djangocms_blog_post_thumbnail', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Main image thumbnail', blank=True, to='cmsplugin_filer_image.ThumbnailOption', null=True), + field=models.ForeignKey(related_name='djangocms_blog_post_thumbnail', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Main image thumbnail', blank=True, to=thumbnail_model, null=True), preserve_default=True, ), ] diff --git a/djangocms_blog/migrations/0007_auto_20150719_0933.py b/djangocms_blog/migrations/0007_auto_20150719_0933.py index b305433..f5fa900 100644 --- a/djangocms_blog/migrations/0007_auto_20150719_0933.py +++ b/djangocms_blog/migrations/0007_auto_20150719_0933.py @@ -7,6 +7,7 @@ import djangocms_text_ckeditor.fields import filer.fields.image from django.conf import settings from django.db import migrations, models +from djangocms_blog.models import thumbnail_model from filer.settings import FILER_IMAGE_MODEL ACTUAL_FILER_IMAGE_MODEL = FILER_IMAGE_MODEL or 'filer.Image' @@ -109,13 +110,13 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='post', name='main_image_full', - field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, verbose_name='main image full', to='cmsplugin_filer_image.ThumbnailOption', related_name='djangocms_blog_post_full', null=True), + field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, verbose_name='main image full', to=thumbnail_model, related_name='djangocms_blog_post_full', null=True), preserve_default=True, ), migrations.AlterField( model_name='post', name='main_image_thumbnail', - field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, verbose_name='main image thumbnail', to='cmsplugin_filer_image.ThumbnailOption', related_name='djangocms_blog_post_thumbnail', null=True), + field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, verbose_name='main image thumbnail', to=thumbnail_model, related_name='djangocms_blog_post_thumbnail', null=True), preserve_default=True, ), migrations.AlterField( diff --git a/djangocms_blog/models.py b/djangocms_blog/models.py index d38b504..8de9272 100644 --- a/djangocms_blog/models.py +++ b/djangocms_blog/models.py @@ -26,6 +26,13 @@ from .settings import get_setting BLOG_CURRENT_POST_IDENTIFIER = get_setting('CURRENT_POST_IDENTIFIER') BLOG_CURRENT_NAMESPACE = get_setting('CURRENT_NAMESPACE') +try: + from filer.models import ThumbnailOption # NOQA + thumbnail_model = 'filer.ThumbnailOption' +except ImportError: + from cmsplugin_filer_image.models import ThumbnailOption # NOQA + thumbnail_model = 'cmsplugin_filer_image.ThumbnailOption' + @python_2_unicode_compatible class BlogCategory(TranslatableModel): @@ -104,12 +111,12 @@ class Post(ModelMeta, TranslatableModel): main_image = FilerImageField(verbose_name=_('main image'), blank=True, null=True, on_delete=models.SET_NULL, related_name='djangocms_blog_post_image') - main_image_thumbnail = models.ForeignKey('cmsplugin_filer_image.ThumbnailOption', + main_image_thumbnail = models.ForeignKey(thumbnail_model, verbose_name=_('main image thumbnail'), related_name='djangocms_blog_post_thumbnail', on_delete=models.SET_NULL, blank=True, null=True) - main_image_full = models.ForeignKey('cmsplugin_filer_image.ThumbnailOption', + main_image_full = models.ForeignKey(thumbnail_model, verbose_name=_('main image full'), related_name='djangocms_blog_post_full', on_delete=models.SET_NULL, diff --git a/djangocms_blog/south_migrations/0001_initial.py b/djangocms_blog/south_migrations/0001_initial.py index b3087dc..e61d8f8 100644 --- a/djangocms_blog/south_migrations/0001_initial.py +++ b/djangocms_blog/south_migrations/0001_initial.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- from django.contrib.auth import get_user_model from django.utils import timezone +from djangocms_blog.models import thumbnail_model from south.db import db from south.v2 import SchemaMigration from django.db import models @@ -66,8 +67,8 @@ class Migration(SchemaMigration): ('date_published_end', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)), ('publish', self.gf('django.db.models.fields.BooleanField')(default=False)), ('main_image', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['filer.Image'], null=True, blank=True)), - ('main_image_thumbnail', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='blog_post_thumbnail', null=True, to=orm['cmsplugin_filer_image.ThumbnailOption'])), - ('main_image_full', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='blog_post_full', null=True, to=orm['cmsplugin_filer_image.ThumbnailOption'])), + ('main_image_thumbnail', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='blog_post_thumbnail', null=True, to=orm[thumbnail_model])), + ('main_image_full', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='blog_post_full', null=True, to=orm[thumbnail_model])), ('content', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['cms.Placeholder'], null=True)), )) db.send_create_signal(u'djangocms_blog', ['Post']) @@ -218,7 +219,7 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "('width', 'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -273,8 +274,8 @@ class Migration(SchemaMigration): 'date_published_end': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['filer.Image']", 'null': 'True', 'blank': 'True'}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_full'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_thumbnail'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_full'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_thumbnail'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) }, u'djangocms_blog.posttranslation': { diff --git a/djangocms_blog/south_migrations/0002_auto__del_blogcategorytranslation__del_unique_blogcategorytranslation_.py b/djangocms_blog/south_migrations/0002_auto__del_blogcategorytranslation__del_unique_blogcategorytranslation_.py index 0f6a554..f2a3583 100644 --- a/djangocms_blog/south_migrations/0002_auto__del_blogcategorytranslation__del_unique_blogcategorytranslation_.py +++ b/djangocms_blog/south_migrations/0002_auto__del_blogcategorytranslation__del_unique_blogcategorytranslation_.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- from django.conf import settings as dj_settings +from djangocms_blog.models import thumbnail_model from south.db import db from south.v2 import SchemaMigration @@ -12,7 +13,7 @@ class Migration(SchemaMigration): def backwards(self, orm): raise RuntimeError("Cannot reverse this migration. 'Post.author' and its values cannot be restored.") - + # The following code is provided here to aid in writing a correct migration # Changing field 'Post.author' db.alter_column(u'djangocms_blog_post', 'author_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm[dj_settings.AUTH_USER_MODEL])) @@ -68,7 +69,7 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "('width', 'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -123,8 +124,8 @@ class Migration(SchemaMigration): 'date_published_end': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['filer.Image']", 'null': 'True', 'blank': 'True'}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_full'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_thumbnail'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_full'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_thumbnail'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) }, u'djangocms_blog.post_translation': { diff --git a/djangocms_blog/south_migrations/0003_rename_plugins.py b/djangocms_blog/south_migrations/0003_rename_plugins.py index 2c62b0d..27adfcd 100644 --- a/djangocms_blog/south_migrations/0003_rename_plugins.py +++ b/djangocms_blog/south_migrations/0003_rename_plugins.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- from django.conf import settings as dj_settings +from djangocms_blog.models import thumbnail_model from south.db import db from south.v2 import SchemaMigration @@ -67,7 +68,7 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "('width', 'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -122,8 +123,8 @@ class Migration(SchemaMigration): 'date_published_end': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['filer.Image']", 'null': 'True', 'blank': 'True'}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_full'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_thumbnail'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_full'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_thumbnail'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) }, u'djangocms_blog.posttranslation': { diff --git a/djangocms_blog/south_migrations/0004_auto__add_field_posttranslation_meta_description.py b/djangocms_blog/south_migrations/0004_auto__add_field_posttranslation_meta_description.py index 81518b1..678676d 100644 --- a/djangocms_blog/south_migrations/0004_auto__add_field_posttranslation_meta_description.py +++ b/djangocms_blog/south_migrations/0004_auto__add_field_posttranslation_meta_description.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- from django.conf import settings as dj_settings +from djangocms_blog.models import thumbnail_model from south.db import db from south.v2 import SchemaMigration @@ -69,7 +70,7 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "('width', 'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -124,8 +125,8 @@ class Migration(SchemaMigration): 'date_published_end': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['filer.Image']", 'null': 'True', 'blank': 'True'}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_full'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_thumbnail'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_full'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_thumbnail'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) }, u'djangocms_blog.posttranslation': { @@ -197,4 +198,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['djangocms_blog'] \ No newline at end of file + complete_apps = ['djangocms_blog'] diff --git a/djangocms_blog/south_migrations/0005_auto__add_field_posttranslation_meta_keywords.py b/djangocms_blog/south_migrations/0005_auto__add_field_posttranslation_meta_keywords.py index 5af45bf..e0162a4 100644 --- a/djangocms_blog/south_migrations/0005_auto__add_field_posttranslation_meta_keywords.py +++ b/djangocms_blog/south_migrations/0005_auto__add_field_posttranslation_meta_keywords.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- from django.conf import settings as dj_settings +from djangocms_blog.models import thumbnail_model from south.db import db from south.v2 import SchemaMigration @@ -69,7 +70,7 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "('width', 'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -124,8 +125,8 @@ class Migration(SchemaMigration): 'date_published_end': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['filer.Image']", 'null': 'True', 'blank': 'True'}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_full'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_thumbnail'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_full'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_thumbnail'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) }, u'djangocms_blog.posttranslation': { @@ -198,4 +199,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['djangocms_blog'] \ No newline at end of file + complete_apps = ['djangocms_blog'] diff --git a/djangocms_blog/south_migrations/0006_auto__add_field_post_enable_comments.py b/djangocms_blog/south_migrations/0006_auto__add_field_post_enable_comments.py index 228f717..f32a066 100644 --- a/djangocms_blog/south_migrations/0006_auto__add_field_post_enable_comments.py +++ b/djangocms_blog/south_migrations/0006_auto__add_field_post_enable_comments.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- from django.conf import settings as dj_settings +from djangocms_blog.models import thumbnail_model from south.db import db from south.v2 import SchemaMigration @@ -69,7 +70,7 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "('width', 'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -125,8 +126,8 @@ class Migration(SchemaMigration): 'enable_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_image'", 'null': 'True', 'to': "orm['filer.Image']"}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) }, u'djangocms_blog.posttranslation': { @@ -193,4 +194,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['djangocms_blog'] \ No newline at end of file + complete_apps = ['djangocms_blog'] diff --git a/djangocms_blog/south_migrations/0007_auto__add_field_posttranslation_post_text.py b/djangocms_blog/south_migrations/0007_auto__add_field_posttranslation_post_text.py index f1da468..13c9238 100644 --- a/djangocms_blog/south_migrations/0007_auto__add_field_posttranslation_post_text.py +++ b/djangocms_blog/south_migrations/0007_auto__add_field_posttranslation_post_text.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- from django.conf import settings as dj_settings +from djangocms_blog.models import thumbnail_model from south.db import db from south.v2 import SchemaMigration @@ -69,7 +70,7 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "('width', 'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -125,8 +126,8 @@ class Migration(SchemaMigration): 'enable_comments': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_image'", 'null': 'True', 'to': "orm['filer.Image']"}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) }, u'djangocms_blog.posttranslation': { @@ -194,4 +195,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['djangocms_blog'] \ No newline at end of file + complete_apps = ['djangocms_blog'] diff --git a/djangocms_blog/south_migrations/0008_auto__add_field_posttranslation_meta_title.py b/djangocms_blog/south_migrations/0008_auto__add_field_posttranslation_meta_title.py index e05f7c8..fa79231 100644 --- a/djangocms_blog/south_migrations/0008_auto__add_field_posttranslation_meta_title.py +++ b/djangocms_blog/south_migrations/0008_auto__add_field_posttranslation_meta_title.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from djangocms_blog.models import thumbnail_model from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration @@ -70,7 +71,7 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "(u'width', u'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -126,8 +127,8 @@ class Migration(SchemaMigration): 'enable_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_image'", 'null': 'True', 'to': "orm['filer.Image']"}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) }, u'djangocms_blog.posttranslation': { @@ -196,4 +197,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['djangocms_blog'] \ No newline at end of file + complete_apps = ['djangocms_blog'] diff --git a/djangocms_blog/south_migrations/0009_auto.py b/djangocms_blog/south_migrations/0009_auto.py index 73e6fa1..234f63f 100644 --- a/djangocms_blog/south_migrations/0009_auto.py +++ b/djangocms_blog/south_migrations/0009_auto.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from djangocms_blog.models import thumbnail_model from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration @@ -74,7 +75,7 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "('width', 'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -130,8 +131,8 @@ class Migration(SchemaMigration): 'enable_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_image'", 'null': 'True', 'to': "orm['filer.Image']"}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['sites.Site']", 'null': 'True', 'blank': 'True'}) }, @@ -206,4 +207,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['djangocms_blog'] \ No newline at end of file + complete_apps = ['djangocms_blog'] diff --git a/djangocms_blog/south_migrations/0010_auto__chg_field_post_main_image_full__chg_field_post_main_image__chg_f.py b/djangocms_blog/south_migrations/0010_auto__chg_field_post_main_image_full__chg_field_post_main_image__chg_f.py index d3e8266..1def8b8 100644 --- a/djangocms_blog/south_migrations/0010_auto__chg_field_post_main_image_full__chg_field_post_main_image__chg_f.py +++ b/djangocms_blog/south_migrations/0010_auto__chg_field_post_main_image_full__chg_field_post_main_image__chg_f.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from djangocms_blog.models import thumbnail_model from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration @@ -10,24 +11,24 @@ class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Post.main_image_full' - db.alter_column(u'djangocms_blog_post', 'main_image_full_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, on_delete=models.SET_NULL, to=orm['cmsplugin_filer_image.ThumbnailOption'])) + db.alter_column(u'djangocms_blog_post', 'main_image_full_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, on_delete=models.SET_NULL, to=orm[thumbnail_model])) # Changing field 'Post.main_image' db.alter_column(u'djangocms_blog_post', 'main_image_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, on_delete=models.SET_NULL, to=orm['filer.Image'])) # Changing field 'Post.main_image_thumbnail' - db.alter_column(u'djangocms_blog_post', 'main_image_thumbnail_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, on_delete=models.SET_NULL, to=orm['cmsplugin_filer_image.ThumbnailOption'])) + db.alter_column(u'djangocms_blog_post', 'main_image_thumbnail_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, on_delete=models.SET_NULL, to=orm[thumbnail_model])) def backwards(self, orm): # Changing field 'Post.main_image_full' - db.alter_column(u'djangocms_blog_post', 'main_image_full_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['cmsplugin_filer_image.ThumbnailOption'])) + db.alter_column(u'djangocms_blog_post', 'main_image_full_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm[thumbnail_model])) # Changing field 'Post.main_image' db.alter_column(u'djangocms_blog_post', 'main_image_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['filer.Image'])) # Changing field 'Post.main_image_thumbnail' - db.alter_column(u'djangocms_blog_post', 'main_image_thumbnail_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['cmsplugin_filer_image.ThumbnailOption'])) + db.alter_column(u'djangocms_blog_post', 'main_image_thumbnail_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm[thumbnail_model])) models = { u'auth.group': { @@ -80,7 +81,7 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "(u'width', u'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -136,8 +137,8 @@ class Migration(SchemaMigration): 'enable_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_image'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['filer.Image']"}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['sites.Site']", 'null': 'True', 'blank': 'True'}) }, @@ -212,4 +213,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['djangocms_blog'] \ No newline at end of file + complete_apps = ['djangocms_blog'] diff --git a/djangocms_blog/south_migrations/0011_chg_field_post_translation_abstract.py b/djangocms_blog/south_migrations/0011_chg_field_post_translation_abstract.py index d71f869..c828bbd 100644 --- a/djangocms_blog/south_migrations/0011_chg_field_post_translation_abstract.py +++ b/djangocms_blog/south_migrations/0011_chg_field_post_translation_abstract.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from djangocms_blog.models import thumbnail_model from south.db import db from south.v2 import SchemaMigration @@ -61,7 +62,7 @@ class Migration(SchemaMigration): 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255'}) }, - 'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'object_name': 'ThumbnailOption', 'ordering': "('width', 'height')"}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -117,8 +118,8 @@ class Migration(SchemaMigration): 'enable_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'on_delete': 'models.SET_NULL', 'blank': 'True', 'to': "orm['filer.Image']", 'null': 'True', 'related_name': "'djangocms_blog_post_image'"}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'on_delete': 'models.SET_NULL', 'blank': 'True', 'to': "orm['cmsplugin_filer_image.ThumbnailOption']", 'null': 'True', 'related_name': "'djangocms_blog_post_full'"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'on_delete': 'models.SET_NULL', 'blank': 'True', 'to': "orm['cmsplugin_filer_image.ThumbnailOption']", 'null': 'True', 'related_name': "'djangocms_blog_post_thumbnail'"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'on_delete': 'models.SET_NULL', 'blank': 'True', 'to': "orm[thumbnail_model]", 'null': 'True', 'related_name': "'djangocms_blog_post_full'"}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'on_delete': 'models.SET_NULL', 'blank': 'True', 'to': "orm[thumbnail_model]", 'null': 'True', 'related_name': "'djangocms_blog_post_thumbnail'"}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'sites': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'to': "orm['sites.Site']", 'null': 'True', 'symmetrical': 'False'}) }, diff --git a/djangocms_blog/south_migrations/0012_move_tags.py b/djangocms_blog/south_migrations/0012_move_tags.py index bcf9def..b63a9d4 100644 --- a/djangocms_blog/south_migrations/0012_move_tags.py +++ b/djangocms_blog/south_migrations/0012_move_tags.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from djangocms_blog.models import thumbnail_model from django.contrib.contenttypes.models import ContentType from south.utils import datetime_utils as datetime from south.db import db @@ -90,7 +91,7 @@ class Migration(DataMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "(u'width', u'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -146,8 +147,8 @@ class Migration(DataMigration): 'enable_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_image'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['filer.Image']"}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['sites.Site']", 'null': 'True', 'blank': 'True'}) }, diff --git a/djangocms_blog/south_migrations/0013_auto.py b/djangocms_blog/south_migrations/0013_auto.py index c1c4d16..865679b 100644 --- a/djangocms_blog/south_migrations/0013_auto.py +++ b/djangocms_blog/south_migrations/0013_auto.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from djangocms_blog.models import thumbnail_model from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration @@ -73,7 +74,7 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "(u'width', u'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -128,8 +129,8 @@ class Migration(SchemaMigration): 'enable_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_image'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['filer.Image']"}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['sites.Site']", 'null': 'True', 'blank': 'True'}) }, @@ -198,4 +199,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['djangocms_blog'] \ No newline at end of file + complete_apps = ['djangocms_blog'] diff --git a/djangocms_blog/south_migrations/0014_auto__add_genericblogplugin__add_blogconfig__add_blogconfigtranslation.py b/djangocms_blog/south_migrations/0014_auto__add_genericblogplugin__add_blogconfig__add_blogconfigtranslation.py index ecd1300..9ce9ec3 100644 --- a/djangocms_blog/south_migrations/0014_auto__add_genericblogplugin__add_blogconfig__add_blogconfigtranslation.py +++ b/djangocms_blog/south_migrations/0014_auto__add_genericblogplugin__add_blogconfig__add_blogconfigtranslation.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from djangocms_blog.models import thumbnail_model from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration @@ -133,7 +134,7 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "(u'width', u'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -211,8 +212,8 @@ class Migration(SchemaMigration): 'enable_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_image'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['filer.Image']"}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_full'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_thumbnail'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_full'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_thumbnail'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'sites': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['sites.Site']", 'symmetrical': 'False', 'blank': 'True'}) }, @@ -282,4 +283,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['djangocms_blog'] \ No newline at end of file + complete_apps = ['djangocms_blog'] diff --git a/djangocms_blog/south_migrations/0015_create_appconfig.py b/djangocms_blog/south_migrations/0015_create_appconfig.py index 7f8e270..e38bed9 100644 --- a/djangocms_blog/south_migrations/0015_create_appconfig.py +++ b/djangocms_blog/south_migrations/0015_create_appconfig.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from djangocms_blog.models import thumbnail_model from south.utils import datetime_utils as datetime from south.db import db from south.v2 import DataMigration @@ -84,7 +85,7 @@ class Migration(DataMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "(u'width', u'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -162,8 +163,8 @@ class Migration(DataMigration): 'enable_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_image'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['filer.Image']"}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_full'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_thumbnail'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_full'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_thumbnail'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'sites': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['sites.Site']", 'symmetrical': 'False', 'blank': 'True'}) }, @@ -233,4 +234,4 @@ class Migration(DataMigration): } } - complete_apps = ['djangocms_blog'] \ No newline at end of file + complete_apps = ['djangocms_blog'] diff --git a/djangocms_blog/south_migrations/0016_auto__add_field_blogconfigtranslation_object_name.py b/djangocms_blog/south_migrations/0016_auto__add_field_blogconfigtranslation_object_name.py index 22c47d9..4eed613 100644 --- a/djangocms_blog/south_migrations/0016_auto__add_field_blogconfigtranslation_object_name.py +++ b/djangocms_blog/south_migrations/0016_auto__add_field_blogconfigtranslation_object_name.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from djangocms_blog.models import thumbnail_model from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration @@ -70,7 +71,7 @@ class Migration(SchemaMigration): 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) }, - 'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'object_name': 'ThumbnailOption', 'ordering': "('width', 'height')"}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -149,8 +150,8 @@ class Migration(SchemaMigration): 'enable_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'on_delete': 'models.SET_NULL', 'null': 'True', 'to': "orm['filer.Image']", 'related_name': "'djangocms_blog_post_image'", 'blank': 'True'}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'on_delete': 'models.SET_NULL', 'null': 'True', 'to': "orm['cmsplugin_filer_image.ThumbnailOption']", 'related_name': "'djangocms_blog_post_full'", 'blank': 'True'}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'on_delete': 'models.SET_NULL', 'null': 'True', 'to': "orm['cmsplugin_filer_image.ThumbnailOption']", 'related_name': "'djangocms_blog_post_thumbnail'", 'blank': 'True'}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'on_delete': 'models.SET_NULL', 'null': 'True', 'to': "orm[thumbnail_model]", 'related_name': "'djangocms_blog_post_full'", 'blank': 'True'}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'on_delete': 'models.SET_NULL', 'null': 'True', 'to': "orm[thumbnail_model]", 'related_name': "'djangocms_blog_post_thumbnail'", 'blank': 'True'}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['sites.Site']", 'blank': 'True'}) }, From 73f7c6823850f76005e22cffa9edafceb7d91908 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Thu, 25 Feb 2016 08:36:16 +0100 Subject: [PATCH 60/69] Django 1.9 compatible admin --- HISTORY.rst | 1 + djangocms_blog/admin.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index 9185927..a2d231d 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -14,6 +14,7 @@ History * Fix selecting current menu item according to menu layout * Fix some issues with haystack indexes * Add support for moved ThumbnailOption +* Fix Django 1.9 issues 0.6.3 (2015-12-22) ++++++++++++++++++ diff --git a/djangocms_blog/admin.py b/djangocms_blog/admin.py index e48f3f6..412f6f1 100755 --- a/djangocms_blog/admin.py +++ b/djangocms_blog/admin.py @@ -168,6 +168,9 @@ class BlogConfigAdmin(BaseAppHookConfig, TranslatableAdmin): @property def declared_fieldsets(self): + return self.get_fieldsets(None) + + def get_fieldsets(self, request, obj=None): """ Fieldsets configuration """ From 7122cddbb9d1e50ddfec5ac0b65c2a7875101aac Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Thu, 25 Feb 2016 08:37:37 +0100 Subject: [PATCH 61/69] Add Django 1.9 to travis --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index 37941a5..5d26756 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,7 @@ env: matrix: - TOXENV='pep8' - TOXENV='isort' + - DJANGO='django19' CMS='cms32' - DJANGO='django18' CMS='cms32' - DJANGO='django18' CMS='cms31' - DJANGO='django17' CMS='cms32' @@ -72,6 +73,10 @@ matrix: env: DJANGO='django18' CMS='cms31' - python: 2.6 env: DJANGO='django18' CMS='cms32' + - python: 2.6 + env: DJANGO='django19' CMS='cms32' + - python: 3.3 + env: DJANGO='django19' CMS='cms32' - python: 3.5 env: DJANGO='django16' CMS='cms30' - python: 3.5 From 015447ccc3aba40a1fbe7f6a68697c0c32c1c1e6 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Thu, 25 Feb 2016 09:11:15 +0100 Subject: [PATCH 62/69] Fix test --- tests/test_models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_models.py b/tests/test_models.py index 689e2ae..5b28745 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -292,7 +292,7 @@ class ModelsTest(BaseTest): url_en = reverse( '%s:post-detail' % self.app_config_1.namespace, kwargs=kwargs, - current_app=self.app_config_1 + current_app=self.app_config_1.namespace ) self.assertEqual(url_en, post.get_absolute_url()) @@ -305,7 +305,7 @@ class ModelsTest(BaseTest): url_it = reverse( '%s:post-detail' % self.app_config_1.namespace, kwargs=kwargs, - current_app=self.app_config_1 + current_app=self.app_config_1.namespace ) self.assertEqual(url_it, post.get_absolute_url()) self.assertNotEqual(url_it, url_en) From e5b3de7ef4b068d1ce01e8fc9aec59b9182d8662 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Fri, 26 Feb 2016 23:48:37 +0100 Subject: [PATCH 63/69] fix error in wizard tests --- tests/test_wizards.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_wizards.py b/tests/test_wizards.py index 56fe2a2..b3da377 100644 --- a/tests/test_wizards.py +++ b/tests/test_wizards.py @@ -67,7 +67,7 @@ class WizardTest(BaseTest): }, prefix=1) self.assertEqual(form.default_appconfig, app_config) self.assertTrue(form.is_valid()) - self.assertTrue(form.cleaned_data['app_config'], app_config) + self.assertEqual(form.cleaned_data['app_config'].pk, app_config) instance = form.save() self.assertEqual(instance.author, self.user_staff) @@ -81,7 +81,7 @@ class WizardTest(BaseTest): }, prefix=1) self.assertEqual(form.default_appconfig, app_config) self.assertTrue(form.is_valid()) - self.assertTrue(form.cleaned_data['app_config'], app_config) + self.assertEqual(form.cleaned_data['app_config'].pk, app_config) instance = form.save() self.assertEqual(instance.author, self.user_normal) From 90ed83c821a8010310f3d92d6a53d6a30818fccb Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Fri, 26 Feb 2016 23:48:48 +0100 Subject: [PATCH 64/69] Test copy relations --- tests/test_plugins.py | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/tests/test_plugins.py b/tests/test_plugins.py index cb209f2..8a241d9 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -59,6 +59,24 @@ class PluginTest(BaseTest): self.assertTrue(rendered.find('
-1) self.assertTrue(rendered.find(posts[1].get_absolute_url()) > -1) + # Checking copy relations + ph = pages[0].placeholders.get(slot='content') + original = ph.get_plugins('en') + pages[0].publish('en') + published = pages[0].get_public_object() + ph = published.placeholders.get(slot='content') + new = ph.get_plugins('en') + self.assertNotEqual(original, new) + + casted_tags, __ = new[0].get_plugin_instance() + casted_categories, __ = new[1].get_plugin_instance() + + self.assertEqual(casted_tags.tags.count(), 1) + self.assertEqual(casted_tags.categories.count(), 0) + + self.assertEqual(casted_categories.tags.count(), 0) + self.assertEqual(casted_categories.categories.count(), 1) + def test_plugin_authors(self): pages = self.get_pages() posts = self.get_posts() @@ -73,6 +91,36 @@ class PluginTest(BaseTest): rendered = plugin.render_plugin(context, ph) self.assertTrue(rendered.find('No article found') > -1) + plugin.authors.add(self.user) + context = self.get_plugin_context(pages[0], 'en', plugin, edit=True) + rendered = plugin.render_plugin(context, ph) + self.assertTrue(rendered.find('/en/blog/author/admin/') > -1) + self.assertTrue(rendered.find('2 articles') > -1) + + plugin.authors.add(self.user_staff) + context = self.get_plugin_context(pages[0], 'en', plugin, edit=True) + rendered = plugin.render_plugin(context, ph) + self.assertTrue(rendered.find('/en/blog/author/staff/') > -1) + self.assertTrue(rendered.find('0 articles') > -1) + + plugin.authors.add(self.user_normal) + context = self.get_plugin_context(pages[0], 'en', plugin, edit=True) + rendered = plugin.render_plugin(context, ph) + self.assertTrue(rendered.find('/en/blog/author/normal/') > -1) + self.assertTrue(rendered.find('0 articles') > -1) + + # Checking copy relations + ph = pages[0].placeholders.get(slot='content') + original = ph.get_plugins('en') + pages[0].publish('en') + published = pages[0].get_public_object() + ph = published.placeholders.get(slot='content') + new = ph.get_plugins('en') + self.assertNotEqual(original, new) + + casted_authors, __ = new[0].get_plugin_instance() + self.assertEqual(casted_authors.authors.count(), 3) + def test_plugin_tags(self): pages = self.get_pages() posts = self.get_posts() From d11bb96bd41131e9d11b953fabac9af2309e9be9 Mon Sep 17 00:00:00 2001 From: German Ilyin Date: Sat, 27 Feb 2016 03:30:31 +0600 Subject: [PATCH 65/69] Fixing #209 --- djangocms_blog/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/djangocms_blog/models.py b/djangocms_blog/models.py index 8de9272..564c570 100644 --- a/djangocms_blog/models.py +++ b/djangocms_blog/models.py @@ -324,6 +324,8 @@ class LatestPostsPlugin(BasePostPlugin): def copy_relations(self, oldinstance): for tag in oldinstance.tags.all(): self.tags.add(tag) + for category in oldinstance.categories.all(): + self.categories.add(category) def get_posts(self, request): posts = self.post_queryset(request) From b1ac45399e4bbd42a6222e16e39cc03368b55de0 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Fri, 26 Feb 2016 23:50:15 +0100 Subject: [PATCH 66/69] Update history --- HISTORY.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/HISTORY.rst b/HISTORY.rst index a2d231d..61780a4 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -15,6 +15,7 @@ History * Fix some issues with haystack indexes * Add support for moved ThumbnailOption * Fix Django 1.9 issues +* Fix copy relations method in plugins 0.6.3 (2015-12-22) ++++++++++++++++++ From 7e1e981df60252756ee82a3601d131a61cc44796 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sat, 27 Feb 2016 01:05:35 +0100 Subject: [PATCH 67/69] Test travis cache --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index 5d26756..2aadc52 100644 --- a/.travis.yml +++ b/.travis.yml @@ -89,3 +89,8 @@ matrix: env: DJANGO='django17' CMS='cms31' - python: 3.5 env: DJANGO='django17' CMS='cms32' + + +cache: + directories: + $HOME/.tox From f03aa2d4a692d0981f07895260816a0f1b49a7e3 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sat, 27 Feb 2016 07:42:48 +0100 Subject: [PATCH 68/69] Add travis cache --- .travis.yml | 8 +++++--- tox.ini | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2aadc52..25b70f6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,6 @@ env: # command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors install: - - pip install -U tox>=1.8 coveralls - "if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then export PYVER=py26; fi" - "if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then export PYVER=py27; fi" - "if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]]; then export PYVER=py33; fi" @@ -40,7 +39,7 @@ install: script: COMMAND='coverage run' tox -e$TOXENV before_install: - - pip install codecov + - pip install -U tox>=1.8 coveralls codecov wheel pip after_success: - codecov - coveralls @@ -93,4 +92,7 @@ matrix: cache: directories: - $HOME/.tox + - $HOME/.pip-accel + - $HOME/.cache/pip + + diff --git a/tox.ini b/tox.ini index f5e33aa..880745f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,10 +1,9 @@ [tox] -envlist = pep8,isort,py{35,34,33,27}-django{19,18}-cms{32,31},py{34,33,27}-django{17,16}-cms{32,31,30},py{26}-django16-cms{31,30} +envlist = pep8,isort,py{35,34,27}-django{19}-cms{32},py{35,34,33,27}-django{18}-cms{32,31},py{34,33,27}-django{17,16}-cms{32,31,30},py{26}-django16-cms{31,30} [testenv] commands = {env:COMMAND:python} cms_helper.py test djangocms_blog --no-migrate deps = - -r{toxinidir}/requirements-test.txt django16: Django>=1.6,<1.7 django16: django-taggit<0.18 django16: django-mptt<0.8 @@ -24,6 +23,7 @@ deps = py26: unittest2 https://github.com/aldryn/aldryn-apphooks-config/archive/master.zip https://github.com/nephila/djangocms-apphook-setup/archive/master.zip + -r{toxinidir}/requirements-test.txt [testenv:isort] deps = isort From 79c78a09acf7fe43fc8e454d35d27ea90c41cbf0 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sat, 27 Feb 2016 10:20:23 +0100 Subject: [PATCH 69/69] Bump development version --- djangocms_blog/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/djangocms_blog/__init__.py b/djangocms_blog/__init__.py index 0519514..fe8a85e 100644 --- a/djangocms_blog/__init__.py +++ b/djangocms_blog/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- __author__ = 'Iacopo Spalletti' __email__ = 'i.spalletti@nephila.it' -__version__ = '0.6.3.post1' +__version__ = '0.7.0.b1' default_app_config = 'djangocms_blog.apps.BlogAppConfig'