From a72603800ecb00085ccc79ef56e1b5eb3ea6db5a Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Marec Date: Wed, 11 Dec 2013 17:17:20 +0100 Subject: [PATCH 01/18] Fixed discard cache on set value (key prefix was missing) --- constance/backends/database/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/constance/backends/database/__init__.py b/constance/backends/database/__init__.py index 3a447cb..a257974 100644 --- a/constance/backends/database/__init__.py +++ b/constance/backends/database/__init__.py @@ -65,4 +65,4 @@ class DatabaseBackend(Backend): def clear(self, sender, instance, created, **kwargs): if db_cache and not created: - db_cache.delete_many(settings.CONFIG.keys()) + db_cache.delete_many(self.add_prefix(k) for k in settings.CONFIG.keys()) From cd3e84586d6518edff5614e2a707280eac75dbb5 Mon Sep 17 00:00:00 2001 From: illumin-us-r3v0lution Date: Wed, 15 Jan 2014 08:22:40 -0500 Subject: [PATCH 02/18] add admin ui support for constance keys as lists fixes #54 --- constance/admin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/constance/admin.py b/constance/admin.py index 9029551..8a86e1b 100644 --- a/constance/admin.py +++ b/constance/admin.py @@ -37,6 +37,7 @@ FIELDS = { int: INTEGER_LIKE, Decimal: (fields.DecimalField, {'widget': NUMERIC_WIDGET}), str: STRING_LIKE, + list: STRING_LIKE, datetime: (fields.DateTimeField, {'widget': widgets.AdminSplitDateTime}), date: (fields.DateField, {'widget': widgets.AdminDateWidget}), time: (fields.TimeField, {'widget': widgets.AdminTimeWidget}), From 549577681a539674f45758536089bd2689866df4 Mon Sep 17 00:00:00 2001 From: Camilo Nova Date: Tue, 21 Jan 2014 08:21:18 -0500 Subject: [PATCH 03/18] Fix typo --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 0730ad8..8730647 100644 --- a/README.rst +++ b/README.rst @@ -72,7 +72,7 @@ Redis (default) CONSTANCE_BACKEND = 'constance.backends.redisd.RedisBackend' -The is the default backend and has a couple of options: +This is the default backend and has a couple of options: * ``CONSTANCE_REDIS_CONNECTION`` From 1413571ed799e1c8b2ccfabeef9dae088c066c2a Mon Sep 17 00:00:00 2001 From: Mario Orlandi Date: Wed, 12 Feb 2014 07:07:55 +0100 Subject: [PATCH 04/18] Localization in Italian --- constance/locale/it/LC_MESSAGES/django.mo | Bin 0 -> 923 bytes constance/locale/it/LC_MESSAGES/django.po | 59 ++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 constance/locale/it/LC_MESSAGES/django.mo create mode 100644 constance/locale/it/LC_MESSAGES/django.po diff --git a/constance/locale/it/LC_MESSAGES/django.mo b/constance/locale/it/LC_MESSAGES/django.mo new file mode 100644 index 0000000000000000000000000000000000000000..1cf26fc353c71cade7b5bdac12bb01d16a389730 GIT binary patch literal 923 zcmZvaO>Yx15QYtuuZ08UhTt%TO946EgpXF62DPMViP*GJoAz3{yUt>?u_N0XHN7Em z=ElF`H}Fr8c%4*Dk+3v+Jk~qov1fiiUi!(f9>AW#JZu^E3l`R+8!&JgybC@Dm%vwG zh*<+)fX&PE(@W;yZJaCcK4`!QoPy`D@35!v|J$P?azkXbI2FuN0AtZlUOLT8dPqlcsTJN*9i*aW1^f$yHe*0<)X%slVr{6t!(j83S(-Tu72*P)Zn;ZgTsKRT3SV?FP=LgoBpRX9E{2}S*b z0dHF=Jc9TR3P`9C*WdEE!Rrl*-zV?ZU&r-0hL9i1i3-X8qgzkn`dpU^=lQ@2?MmT| zO{gcVGIU@|p>su>BQxJ^omrvq7Gp;>, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-02-12 06:57+0100\n" +"PO-Revision-Date: 2014-02-12 07:01+0100\n" +"Last-Translator: Mario Orlandi \n" +"Language-Team: LANGUAGE \n" +"Language: \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" + +#: admin.py:97 +msgid "Live settings updated successfully." +msgstr "Le impostazioni attive sono state aggiornate correttamente." + +#: admin.py:102 +msgid "Constance config" +msgstr "Configurazione Impostazioni" + +#: backends/database/models.py:19 +msgid "constance" +msgstr "impostazione" + +#: backends/database/models.py:20 +msgid "constances" +msgstr "impostazioni" + +#: templates/admin/constance/change_list.html:39 +msgid "Name" +msgstr "Nome" + +#: templates/admin/constance/change_list.html:40 +msgid "Default" +msgstr "Default" + +#: templates/admin/constance/change_list.html:41 +msgid "Value" +msgstr "Valore" + +#: templates/admin/constance/change_list.html:42 +msgid "Is modified" +msgstr "Modificato" + +#: templates/admin/constance/change_list.html:68 +msgid "Save" +msgstr "Salva" + +#: templates/admin/constance/change_list.html:78 +msgid "Home" +msgstr "Inizio" + From 498d9f7b3e976d096b4a79838569893e41deea75 Mon Sep 17 00:00:00 2001 From: Yin Jifeng Date: Tue, 1 Apr 2014 13:35:40 +0800 Subject: [PATCH 05/18] fix basestring in python 3 --- constance/backends/redisd.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/constance/backends/redisd.py b/constance/backends/redisd.py index d32477d..688eee1 100644 --- a/constance/backends/redisd.py +++ b/constance/backends/redisd.py @@ -1,3 +1,4 @@ +import six from six.moves import zip from django.core.exceptions import ImproperlyConfigured @@ -25,7 +26,7 @@ class RedisBackend(Backend): except ImportError: raise ImproperlyConfigured( "The Redis backend requires redis-py to be installed.") - if isinstance(settings.REDIS_CONNECTION, basestring): + if isinstance(settings.REDIS_CONNECTION, six.string_types): self._rd = redis.from_url(settings.REDIS_CONNECTION) else: self._rd = redis.Redis(**settings.REDIS_CONNECTION) From 7d5a57e396f2210ebbb26871e97b4e05e529eee0 Mon Sep 17 00:00:00 2001 From: Yin Jifeng Date: Tue, 1 Apr 2014 13:36:16 +0800 Subject: [PATCH 06/18] i18n verbose_name_plural for admin home page --- constance/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/constance/admin.py b/constance/admin.py index 9029551..91141f9 100644 --- a/constance/admin.py +++ b/constance/admin.py @@ -142,7 +142,7 @@ class Config(object): app_label = 'constance' object_name = 'Config' model_name = module_name = 'config' - verbose_name_plural = 'config' + verbose_name_plural = _('config') get_ordered_objects = lambda x: False abstract = False swapped = False From 7e0db004293068c8d8c1bd5f7a0738b9af60611a Mon Sep 17 00:00:00 2001 From: Yin Jifeng Date: Tue, 1 Apr 2014 19:05:46 +0800 Subject: [PATCH 07/18] add translation for zh_CN --- constance/locale/zh_CN/LC_MESSAGES/django.mo | Bin 0 -> 875 bytes constance/locale/zh_CN/LC_MESSAGES/django.po | 63 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 constance/locale/zh_CN/LC_MESSAGES/django.mo create mode 100644 constance/locale/zh_CN/LC_MESSAGES/django.po diff --git a/constance/locale/zh_CN/LC_MESSAGES/django.mo b/constance/locale/zh_CN/LC_MESSAGES/django.mo new file mode 100644 index 0000000000000000000000000000000000000000..6ec0e0f270cdea56367679628cd7bc57e4a7fea0 GIT binary patch literal 875 zcmYL`&ubGw6vs!czg7kHq6d)?k7eqnc&OV}yC&NX z4Xz9yK#rN7OH0FM#iO#9uQg&w5oakZ7>TC$FhLZq;#sgLCIkD zL7=+Z!156nl5&?}H{#8}M+MfTNhr~L)MBV8a4YhHX23jT2g?i#CS|~Vfs?jJCG)UI zT$c&aOu}$w43#Jp)#x%q4H_m4Wjz7IAu2H32~>%rd(4%j=#d7CMG$cVSIqo^IcMR9 zRjn1vC9TTZQ7nlg{J4Ptxsww-QMm$ebIlsy7#M#`ajnHc0Z(#exm;7TL1l5)LZ|Yb~bl+y1kd* uQSVtNeg3Yu@uj!6m3H6uUVqEV($4DM$1SwG^CtbYjt1q!e#7S34D=6A, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-04-01 19:00+0800\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: admin.py:97 +msgid "Live settings updated successfully." +msgstr "成功更新实时配置" + +#: admin.py:102 +msgid "Constance config" +msgstr "常量配置" + +#: admin.py:145 +msgid "config" +msgstr "配置" + +#: backends/database/models.py:19 +msgid "constance" +msgstr "常量" + +#: backends/database/models.py:20 +msgid "constances" +msgstr "常量" + +#: templates/admin/constance/change_list.html:39 +msgid "Name" +msgstr "名称" + +#: templates/admin/constance/change_list.html:40 +msgid "Default" +msgstr "默认值" + +#: templates/admin/constance/change_list.html:41 +msgid "Value" +msgstr "值" + +#: templates/admin/constance/change_list.html:42 +msgid "Is modified" +msgstr "是否修改" + +#: templates/admin/constance/change_list.html:68 +msgid "Save" +msgstr "保存" + +#: templates/admin/constance/change_list.html:78 +msgid "Home" +msgstr "首页" From 00c3dcd3e8b0c302e5c03b6ba95859b5e168ecdb Mon Sep 17 00:00:00 2001 From: Mattia Larentis Date: Tue, 6 May 2014 10:57:49 +0200 Subject: [PATCH 08/18] fix typo --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 8730647..ea0e4f1 100644 --- a/README.rst +++ b/README.rst @@ -108,7 +108,7 @@ Database CONSTANCE_BACKEND = 'constance.backends.database.DatabaseBackend' -If you want to use this backend you also need to add the databse backend +If you want to use this backend you also need to add the database backend to your ``INSTALLED_APPS`` setting to make sure the data model is correctly created:: From 26742d06f2fb7d2a213b78e910e9bcd1d1236ade Mon Sep 17 00:00:00 2001 From: Jonas Date: Fri, 23 May 2014 10:02:34 +0200 Subject: [PATCH 09/18] Use app framework for initializing in Django 1.7 --- constance/__init__.py | 7 ++++++- constance/apps.py | 10 ++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 constance/apps.py diff --git a/constance/__init__.py b/constance/__init__.py index 3f6145f..52b7b0c 100644 --- a/constance/__init__.py +++ b/constance/__init__.py @@ -1,3 +1,8 @@ from constance.config import Config -config = Config() +try: + from django.apps import AppConfig +except ImportError: + config = Config() +else: + default_app_config = 'constance.apps.ConstanceConfig' diff --git a/constance/apps.py b/constance/apps.py new file mode 100644 index 0000000..97d0581 --- /dev/null +++ b/constance/apps.py @@ -0,0 +1,10 @@ +from django.apps import AppConfig +from constance.config import Config + + +class ConstanceConfig(AppConfig): + name = 'constance' + verbose_name = 'Constance' + + def ready(self): + self.module.config = Config() From fe7c633e4cd38ce081edf222e9a0d036294cd699 Mon Sep 17 00:00:00 2001 From: Leandra Finger Date: Tue, 8 Jul 2014 17:06:40 +0200 Subject: [PATCH 10/18] Update admin.py Fixing Issue #70 --- constance/admin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/constance/admin.py b/constance/admin.py index 591d7ad..c3ab6ce 100644 --- a/constance/admin.py +++ b/constance/admin.py @@ -21,7 +21,10 @@ except ImportError: # Django < 1.4 from django.conf.urls.defaults import patterns, url -from constance import config, settings +from constance import settings +from constance.config import Config as ConfigClass + +config = ConfigClass() NUMERIC_WIDGET = forms.TextInput(attrs={'size': 10}) From cf3089463a355f304857167139a0b0e792656fd2 Mon Sep 17 00:00:00 2001 From: Petr Knap Date: Mon, 14 Jul 2014 11:24:06 +0200 Subject: [PATCH 11/18] add Czech localization --- constance/locale/cs_CZ/LC_MESSAGES/django.mo | Bin 0 -> 882 bytes constance/locale/cs_CZ/LC_MESSAGES/django.po | 62 +++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 constance/locale/cs_CZ/LC_MESSAGES/django.mo create mode 100644 constance/locale/cs_CZ/LC_MESSAGES/django.po diff --git a/constance/locale/cs_CZ/LC_MESSAGES/django.mo b/constance/locale/cs_CZ/LC_MESSAGES/django.mo new file mode 100644 index 0000000000000000000000000000000000000000..b39473c447b1a166a5b945c23b611408a0a61f44 GIT binary patch literal 882 zcmYk4&2G~`5XYBNpahWkkT`Kzgg8}OoT!M(6k3zGZK$18`I6v(v~@O)!P$+x>xfiH z+&FXL)Keb-aYuqn+PA291|EU`CTYvcqn|xHGymCH|GB&PjbPn`J%D|J-GQCL?4p+l zxeY!9uYo0S5p=;D;0E{z+@1T?oCdrC{}{Xqeg?0DU%&$R72Jd!!tUYwbYZ6Z7qoc` zmkGHAE`g81`=G6}4%$A-bMAt+UK6zS-_6+vQF_{|-9KCQoOUhEFwL=gwkA@h8fam9 zHUL6OYQtqDXryE>iAhEDc%B-vqXvRhH65sK(n~~_1j$HHEsRNItZ6>%awED_=TRiI z?&WDZULiG(q$VE;(&1??$h;;n6S0ojn7G~K^|pQ5@f*!* zy;f+5p~?&kb)0nBt31}MrCeIrtG8G=6Wkz)RnUh^OHOf>InP*el@=ZMX=&LhISv9@ zLyQtzd>;44_Zlp$vx-M|>TXzFep|2kg@9|rS{au*, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-07-14 10:52+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: admin.py:98 +msgid "Live settings updated successfully." +msgstr "Nastavení bylo úspěšně uloženo." + +#: admin.py:103 +msgid "Constance config" +msgstr "Nastavení konstant" + +#: admin.py:146 +msgid "config" +msgstr "nastavení" + +#: backends/database/models.py:19 +msgid "constance" +msgstr "konstanta" + +#: backends/database/models.py:20 +msgid "constances" +msgstr "konstanty" + +#: templates/admin/constance/change_list.html:39 +msgid "Name" +msgstr "Název" + +#: templates/admin/constance/change_list.html:40 +msgid "Default" +msgstr "Výchozí hodnota" + +#: templates/admin/constance/change_list.html:41 +msgid "Value" +msgstr "Hodnota" + +#: templates/admin/constance/change_list.html:42 +msgid "Is modified" +msgstr "Je změněna?" + +#: templates/admin/constance/change_list.html:68 +msgid "Save" +msgstr "Uložit" + +#: templates/admin/constance/change_list.html:78 +msgid "Home" +msgstr "Domů" From 10f8e5f5cfc2d7f8f46e78181d986431785e1e6e Mon Sep 17 00:00:00 2001 From: Omer Katz Date: Wed, 30 Jul 2014 02:01:36 +0300 Subject: [PATCH 12/18] Updated the build matrix. I added Python 3.4 and PyPy and Django 1.6. I also upgraded all minor versions of all Django packages. --- .travis.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index dfb56ec..2c01a7d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,10 +4,13 @@ python: - 2.7 - 3.2 - 3.3 + - 3.4 + - "pypy" env: - DJANGO_VERSION=1.3.7 - - DJANGO_VERSION=1.4.5 - - DJANGO_VERSION=1.5.1 + - DJANGO_VERSION=1.4.13 + - DJANGO_VERSION=1.5.8 + - DJANGO_VERSION=1.6.5 install: - pip install Django==$DJANGO_VERSION - python setup.py install @@ -22,3 +25,11 @@ matrix: env: DJANGO_VERSION=1.4.5 - python: 3.3 env: DJANGO_VERSION=1.3.7 + - python: 3.4 + env: DJANGO_VERSION=1.4.5 + - python: 3.4 + env: DJANGO_VERSION=1.3.7 + - python: "pypy" + env: DJANGO_VERSION=1.4.5 + - python: "pypy" + env: DJANGO_VERSION=1.3.7 From 243c9d35baa85e9ef1fbcf57c8c352fd8ab29b35 Mon Sep 17 00:00:00 2001 From: vl Date: Thu, 7 Aug 2014 11:56:19 +0300 Subject: [PATCH 13/18] Russian translation --- constance/locale/ru/LC_MESSAGES/django.mo | Bin 0 -> 989 bytes constance/locale/ru/LC_MESSAGES/django.po | 58 ++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 constance/locale/ru/LC_MESSAGES/django.mo create mode 100644 constance/locale/ru/LC_MESSAGES/django.po diff --git a/constance/locale/ru/LC_MESSAGES/django.mo b/constance/locale/ru/LC_MESSAGES/django.mo new file mode 100644 index 0000000000000000000000000000000000000000..0b8d7b7dde31db5b866089bc65e1379a5a7e9517 GIT binary patch literal 989 zcmZvZUu)A)7{-q}|5Xq-5D^3q>XmY~Z2p_s9E)qV6_a+f-9T?7wx=?#{W% zl!+oDUWw=@7{juv>CXjv>w<1fm!5 z3!%=5eF(4@JPe)#d%%mJ>KOpfgCm{#y$-A3LDW6)C>Vkna1k6wtRSu<|FNHtQ{W%) zIC$~^A*aC$;1zHTRQqGF4_pDyg6}%{W`{pPj7+@&|Bmvg&XFCYUX(9&7qpN=2&_)M z0fbD1K`fl0!f7Q8YMx87yyi4~L8ilbPI57w5363y<5gmL3!KJW2rqDB+Nf6@!K*ZG zR4P1?e5#O(kc6lR3w4aDtgT)4Ts-G82Ulc}1{XmCf-e_QF7?GseViW6Gp+ zX0enjO^1In-%prch=R5qAWdSQZ9!I;0I=W*UA&RJ);Hy~4C> zng$^&@&!)~@96HBMv>VCmNn>fLAP_4?iTW9#&Tl8%8?Vqz9Yg&r<1dmMe~Mj(oxek za@M$!%@)m4X$;c9Z8$DxW$w)D)H3o@v&!b~OzBee3siSTA`&Xy3lsriu z%eMR?w`7azRIba<@~dpgZ?e^S*h&Q(c!HX268S;4X|fDeTW%+-JN4uxk#FQSk`2h# zlUGE(PS#LpQ#5Tt+(cbP`+tj*, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-03-02 09:54-0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: admin.py:86 +msgid "Live settings updated successfully." +msgstr "Настройки успешно сохранены" + +#: admin.py:91 +msgid "Constance config" +msgstr "Настройки : администрирование" + +#: backends/database/models.py:19 +msgid "constance" +msgstr "настройки" + +#: backends/database/models.py:20 +msgid "constances" +msgstr "настройки" + +#: templates/admin/constance/change_list.html:39 +msgid "Name" +msgstr "Название" + +#: templates/admin/constance/change_list.html:40 +msgid "Default" +msgstr "По умолчанию" + +#: templates/admin/constance/change_list.html:41 +msgid "Value" +msgstr "Текущее значение" + +#: templates/admin/constance/change_list.html:42 +msgid "Is modified" +msgstr "Было изменено" + +#: templates/admin/constance/change_list.html:68 +msgid "Save" +msgstr "Сохранить" + +#: templates/admin/constance/change_list.html:78 +msgid "Home" +msgstr "Главная" From 789d71476ad83d1a2714f23476a088108a6f3d57 Mon Sep 17 00:00:00 2001 From: vl Date: Thu, 7 Aug 2014 12:03:32 +0300 Subject: [PATCH 14/18] Fix one case --- constance/locale/ru/LC_MESSAGES/django.mo | Bin 989 -> 952 bytes constance/locale/ru/LC_MESSAGES/django.po | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/constance/locale/ru/LC_MESSAGES/django.mo b/constance/locale/ru/LC_MESSAGES/django.mo index 0b8d7b7dde31db5b866089bc65e1379a5a7e9517..64b9dd17288c710b7e218f10430d628ae6e58c54 100644 GIT binary patch delta 92 zcmcc1zJq;2jjs>`1H(}!1_p5;eFI4I0qGAwS`tYA2ht`$T9TQ8K>$em0cnu>cpxng Vq>G^ZNl<#}#*=(Zlm9S11ORsq4fFs2 delta 130 zcmdnNewTehjjuTa1H(}!1_p5;{TE2{0clZY1_ntWtpcP?fV3Tu768)4Kw1b$w*YB* zAUz$*-wvfuZ9K`xq^e-0aACuREf@A&*l}U+g&h|gFE(9l0MZQ?_FdQnlmUue*gE+- G(?b9i$tMT^ diff --git a/constance/locale/ru/LC_MESSAGES/django.po b/constance/locale/ru/LC_MESSAGES/django.po index dae4964..468af50 100644 --- a/constance/locale/ru/LC_MESSAGES/django.po +++ b/constance/locale/ru/LC_MESSAGES/django.po @@ -23,7 +23,7 @@ msgstr "Настройки успешно сохранены" #: admin.py:91 msgid "Constance config" -msgstr "Настройки : администрирование" +msgstr "Настройки" #: backends/database/models.py:19 msgid "constance" From ecde8c7b11e2f3bdbf398e01dddfab5579703abd Mon Sep 17 00:00:00 2001 From: vl <1844144@gmail.com> Date: Thu, 7 Aug 2014 13:15:22 +0300 Subject: [PATCH 15/18] Add translation to the app name --- constance/apps.py | 4 ++-- constance/locale/ru/LC_MESSAGES/django.mo | Bin 952 -> 994 bytes constance/locale/ru/LC_MESSAGES/django.po | 15 ++++++++++++--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/constance/apps.py b/constance/apps.py index 97d0581..108f40a 100644 --- a/constance/apps.py +++ b/constance/apps.py @@ -1,10 +1,10 @@ from django.apps import AppConfig from constance.config import Config - +from django.utils.translation import ugettext as _ class ConstanceConfig(AppConfig): name = 'constance' - verbose_name = 'Constance' + verbose_name = _('Constance') def ready(self): self.module.config = Config() diff --git a/constance/locale/ru/LC_MESSAGES/django.mo b/constance/locale/ru/LC_MESSAGES/django.mo index 64b9dd17288c710b7e218f10430d628ae6e58c54..99641a6dcbf6e3362add12849c37c73c8f69dcbe 100644 GIT binary patch delta 303 zcmdnN{)oN)o)F7a1|Z-8Vi_Q=0b)TQz5~P{puot$AONHlfiydiHUiQtK-vmOa|3C6 zAgv6fy`kdyP`U(2vjW8{fixSCt_RYbK)MY`a{=iIK-z(kp`KwjkRb#VxWmN2AP%J8 z18F`W&CblgAPJxCMxX7#NZmjxsSYhyx{V0BJrT{Q*cz z0_p!i+5|{TGD95T2c&@-7~+AnJdiGe@+U#*r9c{JCfIR63J$m@epF}Vnk>nfIk}TD aS-@D=0Emnf3@oioO>_;+HveI~%m@INY8tHo diff --git a/constance/locale/ru/LC_MESSAGES/django.po b/constance/locale/ru/LC_MESSAGES/django.po index 468af50..d3bd180 100644 --- a/constance/locale/ru/LC_MESSAGES/django.po +++ b/constance/locale/ru/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-03-02 09:54-0600\n" +"POT-Creation-Date: 2014-08-07 13:13+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,14 +17,23 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: admin.py:86 +#: admin.py:98 msgid "Live settings updated successfully." msgstr "Настройки успешно сохранены" -#: admin.py:91 +#: admin.py:103 msgid "Constance config" msgstr "Настройки" +#: admin.py:146 +msgid "config" +msgstr "настройки" + +#: apps.py:7 +#, fuzzy +msgid "Constance" +msgstr "настройки" + #: backends/database/models.py:19 msgid "constance" msgstr "настройки" From db43632907db9514e2b9051388fe1cf6482fcf7b Mon Sep 17 00:00:00 2001 From: Lin Xianyi Date: Tue, 12 Aug 2014 10:10:43 +0800 Subject: [PATCH 16/18] Fixed AppRegistryNotReady exception on runserver on Django 1.7rc2. --- constance/apps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/constance/apps.py b/constance/apps.py index 108f40a..264e545 100644 --- a/constance/apps.py +++ b/constance/apps.py @@ -1,6 +1,6 @@ from django.apps import AppConfig from constance.config import Config -from django.utils.translation import ugettext as _ +from django.utils.translation import ugettext_lazy as _ class ConstanceConfig(AppConfig): name = 'constance' From a1b9cb9a28b45af9981687dbf2cd83485304f23b Mon Sep 17 00:00:00 2001 From: David Burke Date: Sun, 17 Aug 2014 12:20:31 -0400 Subject: [PATCH 17/18] Updated example for modern django --- example/cheeseshop/manage.py | 11 ----------- example/cheeseshop/urls.py | 2 +- example/manage.py | 10 ++++++++++ 3 files changed, 11 insertions(+), 12 deletions(-) delete mode 100755 example/cheeseshop/manage.py create mode 100755 example/manage.py diff --git a/example/cheeseshop/manage.py b/example/cheeseshop/manage.py deleted file mode 100755 index 5e78ea9..0000000 --- a/example/cheeseshop/manage.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python -from django.core.management import execute_manager -try: - import settings # Assumed to be in the same directory. -except ImportError: - import sys - sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) - sys.exit(1) - -if __name__ == "__main__": - execute_manager(settings) diff --git a/example/cheeseshop/urls.py b/example/cheeseshop/urls.py index 57ec253..b17590b 100644 --- a/example/cheeseshop/urls.py +++ b/example/cheeseshop/urls.py @@ -1,4 +1,4 @@ -from django.conf.urls.defaults import * +from django.conf.urls import * from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.conf import settings diff --git a/example/manage.py b/example/manage.py new file mode 100755 index 0000000..0ea7766 --- /dev/null +++ b/example/manage.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cheeseshop.settings") + + from django.core.management import execute_from_command_line + + execute_from_command_line(sys.argv) From 54609b4b7cb354c91fb3b0b9095e1fa6682b1aaa Mon Sep 17 00:00:00 2001 From: David Burke Date: Sun, 17 Aug 2014 15:12:10 -0400 Subject: [PATCH 18/18] Allow tests to run on django 1.6+ --- example/cheeseshop/settings.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/example/cheeseshop/settings.py b/example/cheeseshop/settings.py index b13adcf..7d4a7c3 100644 --- a/example/cheeseshop/settings.py +++ b/example/cheeseshop/settings.py @@ -99,6 +99,7 @@ INSTALLED_APPS = ( 'cheeseshop.apps.catalog', 'cheeseshop.apps.storage', 'constance', + 'constance.backends.database', ) CONSTANCE_CONNECTION = { @@ -108,8 +109,10 @@ CONSTANCE_CONNECTION = { } CONSTANCE_CONFIG = { - 'BANNER': ('The National Cheese Emporium', 'name of the shop'), + 'BANNER': ('The National Cheese Emporium', 'name of the shop'), 'OWNER': ('Mr. Henry Wensleydale', 'owner of the shop'), 'MUSICIANS': (4, 'number of musicians inside the shop'), 'DATE_ESTABLISHED': (datetime(1972, 11, 30), "the shop's first opening"), } + +CONSTANCE_BACKEND = 'constance.backends.database.DatabaseBackend'