diff --git a/AUTHORS b/AUTHORS index ba6ee4c..4618079 100644 --- a/AUTHORS +++ b/AUTHORS @@ -21,6 +21,7 @@ Lin Xianyi Marcin Baran Mario Orlandi Mario Rosa +Mariusz Felisiak Mattia Larentis Merijn Bertels Omer Katz diff --git a/constance/admin.py b/constance/admin.py index f40a937..ac3f8d2 100644 --- a/constance/admin.py +++ b/constance/admin.py @@ -149,6 +149,19 @@ class ConstanceForm(forms.Form): 'form and resubmit your changes.')) return value + def clean(self): + cleaned_data = super(ConstanceForm, self).clean() + + field_name_list = [] + for fieldset_title, fields_list in settings.CONFIG_FIELDSETS.items(): + for field_name in fields_list: + field_name_list.append(field_name) + if set(set(settings.CONFIG.keys()) - set(field_name_list)): + raise forms.ValidationError(_('CONSTANCE_CONFIG_FIELDSETS does not contain ' + 'fields that exist in CONSTANCE_CONFIG.')) + + return cleaned_data + class ConstanceAdmin(admin.ModelAdmin): change_list_template = 'admin/constance/change_list.html' diff --git a/constance/apps.py b/constance/apps.py index c939927..6eb988e 100644 --- a/constance/apps.py +++ b/constance/apps.py @@ -1,11 +1,10 @@ from django.db.models import signals from django.apps import AppConfig -from django.utils.translation import ugettext_lazy as _ class ConstanceConfig(AppConfig): name = 'constance' - verbose_name = _('Constance') + verbose_name = 'Constance' def ready(self): super(ConstanceConfig, self).ready() diff --git a/constance/locale/cs_CZ/LC_MESSAGES/django.mo b/constance/locale/cs_CZ/LC_MESSAGES/django.mo index 0e445e6..4c90100 100644 Binary files a/constance/locale/cs_CZ/LC_MESSAGES/django.mo and b/constance/locale/cs_CZ/LC_MESSAGES/django.mo differ diff --git a/constance/locale/cs_CZ/LC_MESSAGES/django.po b/constance/locale/cs_CZ/LC_MESSAGES/django.po index a08da79..ccfdf80 100644 --- a/constance/locale/cs_CZ/LC_MESSAGES/django.po +++ b/constance/locale/cs_CZ/LC_MESSAGES/django.po @@ -1,48 +1,58 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# +# # Translators: msgid "" msgstr "" "Project-Id-Version: django-constance\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-11-27 19:05+0100\n" +"POT-Creation-Date: 2017-06-13 19:40+0530\n" "PO-Revision-Date: 2014-11-27 18:13+0000\n" "Last-Translator: Jannis Leidel \n" -"Language-Team: Czech (Czech Republic) (http://www.transifex.com/projects/p/django-constance/language/cs_CZ/)\n" +"Language-Team: Czech (Czech Republic) (http://www.transifex.com/projects/p/" +"django-constance/language/cs_CZ/)\n" +"Language: cs_CZ\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: cs_CZ\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -#: admin.py:72 +#: admin.py:113 +#, python-format +msgid "" +"Default value type must be equal to declared config parameter type. Please " +"fix the default value of '%(name)s'." +msgstr "" + +#: admin.py:123 #, python-format msgid "" "Constance doesn't support config values of the type %(config_type)s. Please " "fix the value of '%(name)s'." msgstr "" -#: admin.py:91 +#: admin.py:147 msgid "" "The settings have been modified by someone else. Please reload the form and " "resubmit your changes." msgstr "" -#: admin.py:129 +#: admin.py:160 +msgid "" +"CONSTANCE_CONFIG_FIELDSETS does not contain fields that exist in " +"CONSTANCE_CONFIG." +msgstr "" + +#: admin.py:224 msgid "Live settings updated successfully." msgstr "Nastavení bylo úspěšně uloženo." -#: admin.py:134 -msgid "Constance config" -msgstr "Nastavení konstant" - -#: admin.py:177 +#: admin.py:285 msgid "config" msgstr "nastavení" -#: apps.py:9 +#: apps.py:8 msgid "Constance" msgstr "" @@ -54,26 +64,33 @@ msgstr "konstanta" msgid "constances" msgstr "konstanty" -#: templates/admin/constance/change_list.html:50 -msgid "Name" -msgstr "Název" +#: management/commands/constance.py:30 +msgid "Get/Set In-database config settings handled by Constance" +msgstr "" -#: templates/admin/constance/change_list.html:51 -msgid "Default" -msgstr "Výchozí hodnota" - -#: templates/admin/constance/change_list.html:52 -msgid "Value" -msgstr "Hodnota" - -#: templates/admin/constance/change_list.html:53 -msgid "Is modified" -msgstr "Je změněna?" - -#: templates/admin/constance/change_list.html:79 +#: templates/admin/constance/change_list.html:75 msgid "Save" msgstr "Uložit" -#: templates/admin/constance/change_list.html:89 +#: templates/admin/constance/change_list.html:84 msgid "Home" msgstr "Domů" + +#: templates/admin/constance/includes/results_list.html:5 +msgid "Name" +msgstr "Název" + +#: templates/admin/constance/includes/results_list.html:6 +msgid "Default" +msgstr "Výchozí hodnota" + +#: templates/admin/constance/includes/results_list.html:7 +msgid "Value" +msgstr "Hodnota" + +#: templates/admin/constance/includes/results_list.html:8 +msgid "Is modified" +msgstr "Je změněna?" + +#~ msgid "Constance config" +#~ msgstr "Nastavení konstant" diff --git a/constance/locale/de/LC_MESSAGES/django.mo b/constance/locale/de/LC_MESSAGES/django.mo index f27eed4..a0d6598 100644 Binary files a/constance/locale/de/LC_MESSAGES/django.mo and b/constance/locale/de/LC_MESSAGES/django.mo differ diff --git a/constance/locale/de/LC_MESSAGES/django.po b/constance/locale/de/LC_MESSAGES/django.po index e7959df..705ab1e 100644 --- a/constance/locale/de/LC_MESSAGES/django.po +++ b/constance/locale/de/LC_MESSAGES/django.po @@ -1,49 +1,68 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# +# # Translators: # Jannis Leidel , 2014 msgid "" msgstr "" "Project-Id-Version: django-constance\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-11-27 19:05+0100\n" +"POT-Creation-Date: 2017-06-13 19:40+0530\n" "PO-Revision-Date: 2014-11-27 18:17+0000\n" "Last-Translator: Jannis Leidel \n" -"Language-Team: German (http://www.transifex.com/projects/p/django-constance/language/de/)\n" +"Language-Team: German (http://www.transifex.com/projects/p/django-constance/" +"language/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: admin.py:72 +#: admin.py:113 +#, fuzzy, python-format +#| msgid "" +#| "Constance doesn't support config values of the type %(config_type)s. " +#| "Please fix the value of '%(name)s'." +msgid "" +"Default value type must be equal to declared config parameter type. Please " +"fix the default value of '%(name)s'." +msgstr "" +"Konstanze unterstützt die Konfigurationswerte vom Typ %(config_type)s nicht. " +"Bitte den Ausgangswert von '%(name)s' ändern." + +#: admin.py:123 #, python-format msgid "" "Constance doesn't support config values of the type %(config_type)s. Please " "fix the value of '%(name)s'." -msgstr "Konstanze unterstützt die Konfigurationswerte vom Typ %(config_type)s nicht. Bitte den Ausgangswert von '%(name)s' ändern." +msgstr "" +"Konstanze unterstützt die Konfigurationswerte vom Typ %(config_type)s nicht. " +"Bitte den Ausgangswert von '%(name)s' ändern." -#: admin.py:91 +#: admin.py:147 msgid "" "The settings have been modified by someone else. Please reload the form and " "resubmit your changes." -msgstr "Die Konfiguration wurde seit Öffnen dieser Seite verändert. Bitte die Seite neuladen und die Änderungen erneut vornehmen." +msgstr "" +"Die Konfiguration wurde seit Öffnen dieser Seite verändert. Bitte die Seite " +"neuladen und die Änderungen erneut vornehmen." -#: admin.py:129 +#: admin.py:160 +msgid "" +"CONSTANCE_CONFIG_FIELDSETS does not contain fields that exist in " +"CONSTANCE_CONFIG." +msgstr "" + +#: admin.py:224 msgid "Live settings updated successfully." msgstr "Die Livekonfiguration wurde erfolgreich aktualisiert." -#: admin.py:134 -msgid "Constance config" -msgstr "Constance Konfiguration" - -#: admin.py:177 +#: admin.py:285 msgid "config" msgstr "Konfiguration" -#: apps.py:9 +#: apps.py:8 msgid "Constance" msgstr "Konstanze" @@ -55,26 +74,33 @@ msgstr "Konstanze" msgid "constances" msgstr "Konstanzes" -#: templates/admin/constance/change_list.html:50 -msgid "Name" -msgstr "Name" +#: management/commands/constance.py:30 +msgid "Get/Set In-database config settings handled by Constance" +msgstr "" -#: templates/admin/constance/change_list.html:51 -msgid "Default" -msgstr "Voreinstellung" - -#: templates/admin/constance/change_list.html:52 -msgid "Value" -msgstr "Wert" - -#: templates/admin/constance/change_list.html:53 -msgid "Is modified" -msgstr "Ist modifiziert" - -#: templates/admin/constance/change_list.html:79 +#: templates/admin/constance/change_list.html:75 msgid "Save" msgstr "Sichern" -#: templates/admin/constance/change_list.html:89 +#: templates/admin/constance/change_list.html:84 msgid "Home" msgstr "Start" + +#: templates/admin/constance/includes/results_list.html:5 +msgid "Name" +msgstr "Name" + +#: templates/admin/constance/includes/results_list.html:6 +msgid "Default" +msgstr "Voreinstellung" + +#: templates/admin/constance/includes/results_list.html:7 +msgid "Value" +msgstr "Wert" + +#: templates/admin/constance/includes/results_list.html:8 +msgid "Is modified" +msgstr "Ist modifiziert" + +#~ msgid "Constance config" +#~ msgstr "Constance Konfiguration" diff --git a/constance/locale/en/LC_MESSAGES/django.mo b/constance/locale/en/LC_MESSAGES/django.mo index e7f4147..8319b48 100644 Binary files a/constance/locale/en/LC_MESSAGES/django.mo and b/constance/locale/en/LC_MESSAGES/django.mo differ diff --git a/constance/locale/en/LC_MESSAGES/django.po b/constance/locale/en/LC_MESSAGES/django.po index 1bb6893..fa8d488 100644 --- a/constance/locale/en/LC_MESSAGES/django.po +++ b/constance/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-11-27 19:05+0100\n" +"POT-Creation-Date: 2017-06-13 19:40+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,32 +17,41 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: admin.py:72 +#: admin.py:113 +#, python-format +msgid "" +"Default value type must be equal to declared config parameter type. Please " +"fix the default value of '%(name)s'." +msgstr "" + +#: admin.py:123 #, python-format msgid "" "Constance doesn't support config values of the type %(config_type)s. Please " "fix the value of '%(name)s'." msgstr "" -#: admin.py:91 +#: admin.py:147 msgid "" "The settings have been modified by someone else. Please reload the form and " "resubmit your changes." msgstr "" -#: admin.py:129 +#: admin.py:160 +msgid "" +"CONSTANCE_CONFIG_FIELDSETS does not contain fields that exist in " +"CONSTANCE_CONFIG." +msgstr "" + +#: admin.py:224 msgid "Live settings updated successfully." msgstr "" -#: admin.py:134 -msgid "Constance config" -msgstr "" - -#: admin.py:177 +#: admin.py:285 msgid "config" msgstr "" -#: apps.py:9 +#: apps.py:8 msgid "Constance" msgstr "" @@ -54,26 +63,30 @@ msgstr "" msgid "constances" msgstr "" -#: templates/admin/constance/change_list.html:50 -msgid "Name" +#: management/commands/constance.py:30 +msgid "Get/Set In-database config settings handled by Constance" msgstr "" -#: templates/admin/constance/change_list.html:51 -msgid "Default" -msgstr "" - -#: templates/admin/constance/change_list.html:52 -msgid "Value" -msgstr "" - -#: templates/admin/constance/change_list.html:53 -msgid "Is modified" -msgstr "" - -#: templates/admin/constance/change_list.html:79 +#: templates/admin/constance/change_list.html:75 msgid "Save" msgstr "" -#: templates/admin/constance/change_list.html:89 +#: templates/admin/constance/change_list.html:84 msgid "Home" msgstr "" + +#: templates/admin/constance/includes/results_list.html:5 +msgid "Name" +msgstr "" + +#: templates/admin/constance/includes/results_list.html:6 +msgid "Default" +msgstr "" + +#: templates/admin/constance/includes/results_list.html:7 +msgid "Value" +msgstr "" + +#: templates/admin/constance/includes/results_list.html:8 +msgid "Is modified" +msgstr "" diff --git a/constance/locale/es/LC_MESSAGES/django.mo b/constance/locale/es/LC_MESSAGES/django.mo index 72f56d2..55a6b6c 100644 Binary files a/constance/locale/es/LC_MESSAGES/django.mo and b/constance/locale/es/LC_MESSAGES/django.mo differ diff --git a/constance/locale/es/LC_MESSAGES/django.po b/constance/locale/es/LC_MESSAGES/django.po index 8604bb5..43b2b88 100644 --- a/constance/locale/es/LC_MESSAGES/django.po +++ b/constance/locale/es/LC_MESSAGES/django.po @@ -1,24 +1,37 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# +# # Translators: # Igor Támara , 2015 msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-01-15 16:23-0500\n" +"POT-Creation-Date: 2017-06-13 19:40+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Igor Támara \n" -"Language-Team: Spanish (http://www.transifex.com/projects/p/django-constance/language/de/\n" +"Language-Team: Spanish (http://www.transifex.com/projects/p/django-constance/" +"language/de/\n" "Language: es\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:71 +#: admin.py:113 +#, fuzzy, python-format +#| msgid "" +#| "Constance doesn't support config values of the type %(config_type)s. " +#| "Please fix the value of '%(name)s'." +msgid "" +"Default value type must be equal to declared config parameter type. Please " +"fix the default value of '%(name)s'." +msgstr "" +"Constance no soporta valores de configuración de los tipos %(config_type)s. " +"Por favor arregle el valor de '%(name)s'." + +#: admin.py:123 #, python-format msgid "" "Constance doesn't support config values of the type %(config_type)s. Please " @@ -27,7 +40,7 @@ msgstr "" "Constance no soporta valores de configuración de los tipos %(config_type)s. " "Por favor arregle el valor de '%(name)s'." -#: admin.py:90 +#: admin.py:147 msgid "" "The settings have been modified by someone else. Please reload the form and " "resubmit your changes." @@ -35,19 +48,21 @@ msgstr "" "La configuración ha sido modificada por alguien más. Por favor recargue el " "formulario y reenvíe sus cambios." -#: admin.py:128 +#: admin.py:160 +msgid "" +"CONSTANCE_CONFIG_FIELDSETS does not contain fields that exist in " +"CONSTANCE_CONFIG." +msgstr "" + +#: admin.py:224 msgid "Live settings updated successfully." msgstr "Las configuraciones en vivo se actualizaron exitosamente." -#: admin.py:133 -msgid "Constance config" -msgstr "Configuración de Constance" - -#: admin.py:176 +#: admin.py:285 msgid "config" msgstr "configuración" -#: apps.py:7 +#: apps.py:8 msgid "Constance" msgstr "Constance" @@ -59,26 +74,33 @@ msgstr "constance" msgid "constances" msgstr "constances" -#: templates/admin/constance/change_list.html:58 -msgid "Name" -msgstr "Nombre" +#: management/commands/constance.py:30 +msgid "Get/Set In-database config settings handled by Constance" +msgstr "" -#: templates/admin/constance/change_list.html:59 -msgid "Default" -msgstr "Predeterminado" - -#: templates/admin/constance/change_list.html:60 -msgid "Value" -msgstr "Valor" - -#: templates/admin/constance/change_list.html:61 -msgid "Is modified" -msgstr "Está modificado" - -#: templates/admin/constance/change_list.html:87 +#: templates/admin/constance/change_list.html:75 msgid "Save" msgstr "Guardar" -#: templates/admin/constance/change_list.html:96 +#: templates/admin/constance/change_list.html:84 msgid "Home" msgstr "Inicio" + +#: templates/admin/constance/includes/results_list.html:5 +msgid "Name" +msgstr "Nombre" + +#: templates/admin/constance/includes/results_list.html:6 +msgid "Default" +msgstr "Predeterminado" + +#: templates/admin/constance/includes/results_list.html:7 +msgid "Value" +msgstr "Valor" + +#: templates/admin/constance/includes/results_list.html:8 +msgid "Is modified" +msgstr "Está modificado" + +#~ msgid "Constance config" +#~ msgstr "Configuración de Constance" diff --git a/constance/locale/et/LC_MESSAGES/django.mo b/constance/locale/et/LC_MESSAGES/django.mo index 724a3f3..31776a3 100644 Binary files a/constance/locale/et/LC_MESSAGES/django.mo and b/constance/locale/et/LC_MESSAGES/django.mo differ diff --git a/constance/locale/et/LC_MESSAGES/django.po b/constance/locale/et/LC_MESSAGES/django.po index 9d83834..e16420a 100644 --- a/constance/locale/et/LC_MESSAGES/django.po +++ b/constance/locale/et/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-04-10 10:26+0000\n" +"POT-Creation-Date: 2017-06-13 19:40+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,25 +18,25 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: constance/admin.py:111 +#: admin.py:113 #, python-format msgid "" "Default value type must be equal to declared config parameter type. Please " "fix the default value of '%(name)s'." msgstr "" -"Vaikimisi väärtus peab olema vastav seade parameetri tüübile. Palun sisestage" -"korrekne vaikimisi väärtus väljale '%(name)s'" +"Vaikimisi väärtus peab olema vastav seade parameetri tüübile. Palun " +"sisestagekorrekne vaikimisi väärtus väljale '%(name)s'" -#: constance/admin.py:121 +#: admin.py:123 #, python-format msgid "" "Constance doesn't support config values of the type %(config_type)s. Please " "fix the value of '%(name)s'." msgstr "" -"Constance ei toeta seadete seda tüüpi %(constance_type) seadete väärtusi. Palun" -"sisestage korrektne väärtus väljale '%(name)s'." +"Constance ei toeta seadete seda tüüpi %(constance_type) seadete väärtusi. " +"Palunsisestage korrektne väärtus väljale '%(name)s'." -#: constance/admin.py:145 +#: admin.py:147 msgid "" "The settings have been modified by someone else. Please reload the form and " "resubmit your changes." @@ -44,50 +44,56 @@ msgstr "" "Seadeid on vahepeal muudetud, palun esitage oma muudatused peale seda kui " "olete lehe uuesti laadinud" -#: constance/admin.py:209 +#: admin.py:160 +msgid "" +"CONSTANCE_CONFIG_FIELDSETS does not contain fields that exist in " +"CONSTANCE_CONFIG." +msgstr "" + +#: admin.py:224 msgid "Live settings updated successfully." msgstr "Seaded edukalt muudetud." -#: constance/admin.py:271 +#: admin.py:285 msgid "config" msgstr "konfiguratsioon" -#: constance/apps.py:8 +#: apps.py:8 msgid "Constance" msgstr "Seaded" -#: constance/backends/database/models.py:19 +#: backends/database/models.py:19 msgid "constance" msgstr "seaded" -#: constance/backends/database/models.py:20 +#: backends/database/models.py:20 msgid "constances" msgstr "seaded" -#: constance/management/commands/constance.py:30 +#: management/commands/constance.py:30 msgid "Get/Set In-database config settings handled by Constance" msgstr "Loe/salvesta andmebaasi põhiseid seadeid" -#: constance/templates/admin/constance/change_list.html:68 +#: templates/admin/constance/change_list.html:75 msgid "Save" msgstr "Salvesta" -#: constance/templates/admin/constance/change_list.html:77 +#: templates/admin/constance/change_list.html:84 msgid "Home" msgstr "" -#: constance/templates/admin/constance/includes/results_list.html:5 +#: templates/admin/constance/includes/results_list.html:5 msgid "Name" msgstr "Nimi" -#: constance/templates/admin/constance/includes/results_list.html:6 +#: templates/admin/constance/includes/results_list.html:6 msgid "Default" msgstr "Vaikimisi" -#: constance/templates/admin/constance/includes/results_list.html:7 +#: templates/admin/constance/includes/results_list.html:7 msgid "Value" msgstr "Väärtus" -#: constance/templates/admin/constance/includes/results_list.html:8 +#: templates/admin/constance/includes/results_list.html:8 msgid "Is modified" msgstr "Muudetud" diff --git a/constance/locale/fr/LC_MESSAGES/django.mo b/constance/locale/fr/LC_MESSAGES/django.mo new file mode 100644 index 0000000..116e58e Binary files /dev/null and b/constance/locale/fr/LC_MESSAGES/django.mo differ diff --git a/constance/locale/fr/LC_MESSAGES/django.po b/constance/locale/fr/LC_MESSAGES/django.po new file mode 100644 index 0000000..44cc39c --- /dev/null +++ b/constance/locale/fr/LC_MESSAGES/django.po @@ -0,0 +1,95 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-07-02 19:01+0100\n" +"PO-Revision-Date: 2017-07-03 12:35+0100\n" +"Last-Translator: Bruno Alla \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" +"Language-Team: \n" +"X-Generator: Poedit 2.0.2\n" + +#: admin.py:111 +#, python-format +msgid "" +"Default value type must be equal to declared config parameter type. Please " +"fix the default value of '%(name)s'." +msgstr "" +"Le type de la valeur par défaut doit être le même que le type déclaré dans " +"la configuration. Veuillez corriger la valeur par défaut de '%(name)s'." + +#: admin.py:121 +#, python-format +msgid "" +"Constance doesn't support config values of the type %(config_type)s. Please " +"fix the value of '%(name)s'." +msgstr "" +"Constance ne prend pas en charge les valeurs de configuration du type " +"%(config_type)s. Veuillez corriger la valeur de ‘%(name)s’." + +#: admin.py:145 +msgid "" +"The settings have been modified by someone else. Please reload the form and " +"resubmit your changes." +msgstr "" +"Les paramètres ont été modifiés par quelqu'un d'autre. Veuillez rafraichir " +"le formulaire et soumettre de nouveau vos modifications." + +#: admin.py:209 +msgid "Live settings updated successfully." +msgstr "Paramètres mis à jour avec succès." + +#: admin.py:271 +msgid "config" +msgstr "config" + +#: apps.py:8 +msgid "Constance" +msgstr "Constance" + +#: backends/database/models.py:19 +msgid "constance" +msgstr "constance" + +#: backends/database/models.py:20 +msgid "constances" +msgstr "constances" + +#: management/commands/constance.py:30 +msgid "Get/Set In-database config settings handled by Constance" +msgstr "" +"Obtenir/définir les paramètres de configuration de base de données gérées " +"par Constance" + +#: templates/admin/constance/change_list.html:68 +msgid "Save" +msgstr "Enregistrer" + +#: templates/admin/constance/change_list.html:77 +msgid "Home" +msgstr "Index" + +#: templates/admin/constance/includes/results_list.html:5 +msgid "Name" +msgstr "Nom" + +#: templates/admin/constance/includes/results_list.html:6 +msgid "Default" +msgstr "Défaut" + +#: templates/admin/constance/includes/results_list.html:7 +msgid "Value" +msgstr "Valeur" + +#: templates/admin/constance/includes/results_list.html:8 +msgid "Is modified" +msgstr "Est modifié" diff --git a/constance/locale/it/LC_MESSAGES/django.mo b/constance/locale/it/LC_MESSAGES/django.mo index c32a4c7..144f32f 100644 Binary files a/constance/locale/it/LC_MESSAGES/django.mo and b/constance/locale/it/LC_MESSAGES/django.mo differ diff --git a/constance/locale/it/LC_MESSAGES/django.po b/constance/locale/it/LC_MESSAGES/django.po index f92dea6..eb74fcc 100644 --- a/constance/locale/it/LC_MESSAGES/django.po +++ b/constance/locale/it/LC_MESSAGES/django.po @@ -1,48 +1,58 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# +# # Translators: msgid "" msgstr "" "Project-Id-Version: django-constance\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-11-27 19:05+0100\n" +"POT-Creation-Date: 2017-06-13 19:40+0530\n" "PO-Revision-Date: 2014-11-27 18:13+0000\n" "Last-Translator: Jannis Leidel \n" -"Language-Team: Italian (http://www.transifex.com/projects/p/django-constance/language/it/)\n" +"Language-Team: Italian (http://www.transifex.com/projects/p/django-constance/" +"language/it/)\n" +"Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: it\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: admin.py:72 +#: admin.py:113 +#, python-format +msgid "" +"Default value type must be equal to declared config parameter type. Please " +"fix the default value of '%(name)s'." +msgstr "" + +#: admin.py:123 #, python-format msgid "" "Constance doesn't support config values of the type %(config_type)s. Please " "fix the value of '%(name)s'." msgstr "" -#: admin.py:91 +#: admin.py:147 msgid "" "The settings have been modified by someone else. Please reload the form and " "resubmit your changes." msgstr "" -#: admin.py:129 +#: admin.py:160 +msgid "" +"CONSTANCE_CONFIG_FIELDSETS does not contain fields that exist in " +"CONSTANCE_CONFIG." +msgstr "" + +#: admin.py:224 msgid "Live settings updated successfully." msgstr "Le impostazioni attive sono state aggiornate correttamente." -#: admin.py:134 -msgid "Constance config" -msgstr "Configurazione Impostazioni" - -#: admin.py:177 +#: admin.py:285 msgid "config" msgstr "" -#: apps.py:9 +#: apps.py:8 msgid "Constance" msgstr "" @@ -54,26 +64,33 @@ msgstr "impostazione" msgid "constances" msgstr "impostazioni" -#: templates/admin/constance/change_list.html:50 -msgid "Name" -msgstr "Nome" +#: management/commands/constance.py:30 +msgid "Get/Set In-database config settings handled by Constance" +msgstr "" -#: templates/admin/constance/change_list.html:51 -msgid "Default" -msgstr "Default" - -#: templates/admin/constance/change_list.html:52 -msgid "Value" -msgstr "Valore" - -#: templates/admin/constance/change_list.html:53 -msgid "Is modified" -msgstr "Modificato" - -#: templates/admin/constance/change_list.html:79 +#: templates/admin/constance/change_list.html:75 msgid "Save" msgstr "Salva" -#: templates/admin/constance/change_list.html:89 +#: templates/admin/constance/change_list.html:84 msgid "Home" msgstr "Inizio" + +#: templates/admin/constance/includes/results_list.html:5 +msgid "Name" +msgstr "Nome" + +#: templates/admin/constance/includes/results_list.html:6 +msgid "Default" +msgstr "Default" + +#: templates/admin/constance/includes/results_list.html:7 +msgid "Value" +msgstr "Valore" + +#: templates/admin/constance/includes/results_list.html:8 +msgid "Is modified" +msgstr "Modificato" + +#~ msgid "Constance config" +#~ msgstr "Configurazione Impostazioni" diff --git a/constance/locale/pl/LC_MESSAGES/django.po b/constance/locale/pl/LC_MESSAGES/django.po index 0c56643..47348bb 100644 --- a/constance/locale/pl/LC_MESSAGES/django.po +++ b/constance/locale/pl/LC_MESSAGES/django.po @@ -1,48 +1,59 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# +# # Translators: msgid "" msgstr "" "Project-Id-Version: django-constance\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-11-27 19:05+0100\n" +"POT-Creation-Date: 2017-06-13 19:40+0530\n" "PO-Revision-Date: 2014-11-27 18:13+0000\n" "Last-Translator: Jannis Leidel \n" -"Language-Team: Polish (http://www.transifex.com/projects/p/django-constance/language/pl/)\n" +"Language-Team: Polish (http://www.transifex.com/projects/p/django-constance/" +"language/pl/)\n" +"Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: pl\n" -"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" -#: admin.py:72 +#: admin.py:113 +#, python-format +msgid "" +"Default value type must be equal to declared config parameter type. Please " +"fix the default value of '%(name)s'." +msgstr "" + +#: admin.py:123 #, python-format msgid "" "Constance doesn't support config values of the type %(config_type)s. Please " "fix the value of '%(name)s'." msgstr "" -#: admin.py:91 +#: admin.py:147 msgid "" "The settings have been modified by someone else. Please reload the form and " "resubmit your changes." msgstr "" -#: admin.py:129 +#: admin.py:160 +msgid "" +"CONSTANCE_CONFIG_FIELDSETS does not contain fields that exist in " +"CONSTANCE_CONFIG." +msgstr "" + +#: admin.py:224 msgid "Live settings updated successfully." msgstr "Parametry zostały zaktualizowane" -#: admin.py:134 -msgid "Constance config" -msgstr "Konfiguracja Constance" - -#: admin.py:177 +#: admin.py:285 msgid "config" msgstr "" -#: apps.py:9 +#: apps.py:8 msgid "Constance" msgstr "" @@ -54,26 +65,33 @@ msgstr "parametr" msgid "constances" msgstr "parametry" -#: templates/admin/constance/change_list.html:50 -msgid "Name" -msgstr "Nazwa" +#: management/commands/constance.py:30 +msgid "Get/Set In-database config settings handled by Constance" +msgstr "" -#: templates/admin/constance/change_list.html:51 -msgid "Default" -msgstr "Domyślnie" - -#: templates/admin/constance/change_list.html:52 -msgid "Value" -msgstr "Wartość" - -#: templates/admin/constance/change_list.html:53 -msgid "Is modified" -msgstr "Zmodyfikowana" - -#: templates/admin/constance/change_list.html:79 +#: templates/admin/constance/change_list.html:75 msgid "Save" msgstr "Zapisz" -#: templates/admin/constance/change_list.html:89 +#: templates/admin/constance/change_list.html:84 msgid "Home" msgstr "Początek" + +#: templates/admin/constance/includes/results_list.html:5 +msgid "Name" +msgstr "Nazwa" + +#: templates/admin/constance/includes/results_list.html:6 +msgid "Default" +msgstr "Domyślnie" + +#: templates/admin/constance/includes/results_list.html:7 +msgid "Value" +msgstr "Wartość" + +#: templates/admin/constance/includes/results_list.html:8 +msgid "Is modified" +msgstr "Zmodyfikowana" + +#~ msgid "Constance config" +#~ msgstr "Konfiguracja Constance" diff --git a/constance/locale/ru/LC_MESSAGES/django.mo b/constance/locale/ru/LC_MESSAGES/django.mo index 05fb96f..c749d68 100644 Binary files a/constance/locale/ru/LC_MESSAGES/django.mo and b/constance/locale/ru/LC_MESSAGES/django.mo differ diff --git a/constance/locale/ru/LC_MESSAGES/django.po b/constance/locale/ru/LC_MESSAGES/django.po index 23bcc0d..9e1ca54 100644 --- a/constance/locale/ru/LC_MESSAGES/django.po +++ b/constance/locale/ru/LC_MESSAGES/django.po @@ -1,48 +1,59 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# +# # Translators: msgid "" msgstr "" "Project-Id-Version: django-constance\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-11-27 19:05+0100\n" +"POT-Creation-Date: 2017-06-13 19:40+0530\n" "PO-Revision-Date: 2014-11-27 18:13+0000\n" "Last-Translator: Jannis Leidel \n" -"Language-Team: Russian (http://www.transifex.com/projects/p/django-constance/language/ru/)\n" +"Language-Team: Russian (http://www.transifex.com/projects/p/django-constance/" +"language/ru/)\n" +"Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: ru\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -#: admin.py:72 +#: admin.py:113 +#, python-format +msgid "" +"Default value type must be equal to declared config parameter type. Please " +"fix the default value of '%(name)s'." +msgstr "" + +#: admin.py:123 #, python-format msgid "" "Constance doesn't support config values of the type %(config_type)s. Please " "fix the value of '%(name)s'." msgstr "" -#: admin.py:91 +#: admin.py:147 msgid "" "The settings have been modified by someone else. Please reload the form and " "resubmit your changes." msgstr "" -#: admin.py:129 +#: admin.py:160 +msgid "" +"CONSTANCE_CONFIG_FIELDSETS does not contain fields that exist in " +"CONSTANCE_CONFIG." +msgstr "" + +#: admin.py:224 msgid "Live settings updated successfully." msgstr "Настройки успешно сохранены" -#: admin.py:134 -msgid "Constance config" -msgstr "Настройки" - -#: admin.py:177 +#: admin.py:285 msgid "config" msgstr "настройки" -#: apps.py:9 +#: apps.py:8 msgid "Constance" msgstr "" @@ -54,26 +65,33 @@ msgstr "настройки" msgid "constances" msgstr "настройки" -#: templates/admin/constance/change_list.html:50 -msgid "Name" -msgstr "Название" +#: management/commands/constance.py:30 +msgid "Get/Set In-database config settings handled by Constance" +msgstr "" -#: templates/admin/constance/change_list.html:51 -msgid "Default" -msgstr "По умолчанию" - -#: templates/admin/constance/change_list.html:52 -msgid "Value" -msgstr "Текущее значение" - -#: templates/admin/constance/change_list.html:53 -msgid "Is modified" -msgstr "Было изменено" - -#: templates/admin/constance/change_list.html:79 +#: templates/admin/constance/change_list.html:75 msgid "Save" msgstr "Сохранить" -#: templates/admin/constance/change_list.html:89 +#: templates/admin/constance/change_list.html:84 msgid "Home" msgstr "Главная" + +#: templates/admin/constance/includes/results_list.html:5 +msgid "Name" +msgstr "Название" + +#: templates/admin/constance/includes/results_list.html:6 +msgid "Default" +msgstr "По умолчанию" + +#: templates/admin/constance/includes/results_list.html:7 +msgid "Value" +msgstr "Текущее значение" + +#: templates/admin/constance/includes/results_list.html:8 +msgid "Is modified" +msgstr "Было изменено" + +#~ msgid "Constance config" +#~ msgstr "Настройки" diff --git a/constance/locale/zh_CN/LC_MESSAGES/django.mo b/constance/locale/zh_CN/LC_MESSAGES/django.mo index d9efd21..2f73cb1 100644 Binary files a/constance/locale/zh_CN/LC_MESSAGES/django.mo and b/constance/locale/zh_CN/LC_MESSAGES/django.mo differ diff --git a/constance/locale/zh_CN/LC_MESSAGES/django.po b/constance/locale/zh_CN/LC_MESSAGES/django.po index dbad41c..2fa88bc 100644 --- a/constance/locale/zh_CN/LC_MESSAGES/django.po +++ b/constance/locale/zh_CN/LC_MESSAGES/django.po @@ -1,49 +1,62 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# +# # Translators: # Yifu Yu , 2015 msgid "" msgstr "" "Project-Id-Version: django-constance\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-11-27 19:05+0100\n" +"POT-Creation-Date: 2017-06-13 19:40+0530\n" "PO-Revision-Date: 2015-03-15 18:40+0000\n" "Last-Translator: Yifu Yu \n" -"Language-Team: Chinese (China) (http://www.transifex.com/jezdez/django-constance/language/zh_CN/)\n" +"Language-Team: Chinese (China) (http://www.transifex.com/jezdez/django-" +"constance/language/zh_CN/)\n" +"Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: zh_CN\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: admin.py:72 +#: admin.py:113 +#, fuzzy, python-format +#| msgid "" +#| "Constance doesn't support config values of the type %(config_type)s. " +#| "Please fix the value of '%(name)s'." +msgid "" +"Default value type must be equal to declared config parameter type. Please " +"fix the default value of '%(name)s'." +msgstr "Constance不支持保存类型为%(config_type)s的值,请修正%(name)s的值。" + +#: admin.py:123 #, python-format msgid "" "Constance doesn't support config values of the type %(config_type)s. Please " "fix the value of '%(name)s'." msgstr "Constance不支持保存类型为%(config_type)s的值,请修正%(name)s的值。" -#: admin.py:91 +#: admin.py:147 msgid "" "The settings have been modified by someone else. Please reload the form and " "resubmit your changes." msgstr "设置已经被他人修改过,请刷新页面并重新提交您的更改。" -#: admin.py:129 +#: admin.py:160 +msgid "" +"CONSTANCE_CONFIG_FIELDSETS does not contain fields that exist in " +"CONSTANCE_CONFIG." +msgstr "" + +#: admin.py:224 msgid "Live settings updated successfully." msgstr "成功更新实时配置" -#: admin.py:134 -msgid "Constance config" -msgstr "Constance 配置页面" - -#: admin.py:177 +#: admin.py:285 msgid "config" msgstr "配置" -#: apps.py:9 +#: apps.py:8 msgid "Constance" msgstr "Constance模块" @@ -55,26 +68,33 @@ msgstr "Constance模块" msgid "constances" msgstr "Constance模块" -#: templates/admin/constance/change_list.html:50 -msgid "Name" -msgstr "名称" +#: management/commands/constance.py:30 +msgid "Get/Set In-database config settings handled by Constance" +msgstr "" -#: templates/admin/constance/change_list.html:51 -msgid "Default" -msgstr "默认值" - -#: templates/admin/constance/change_list.html:52 -msgid "Value" -msgstr "值" - -#: templates/admin/constance/change_list.html:53 -msgid "Is modified" -msgstr "是否修改过" - -#: templates/admin/constance/change_list.html:79 +#: templates/admin/constance/change_list.html:75 msgid "Save" msgstr "保存" -#: templates/admin/constance/change_list.html:89 +#: templates/admin/constance/change_list.html:84 msgid "Home" msgstr "首页" + +#: templates/admin/constance/includes/results_list.html:5 +msgid "Name" +msgstr "名称" + +#: templates/admin/constance/includes/results_list.html:6 +msgid "Default" +msgstr "默认值" + +#: templates/admin/constance/includes/results_list.html:7 +msgid "Value" +msgstr "值" + +#: templates/admin/constance/includes/results_list.html:8 +msgid "Is modified" +msgstr "是否修改过" + +#~ msgid "Constance config" +#~ msgstr "Constance 配置页面" diff --git a/constance/templates/admin/constance/change_list.html b/constance/templates/admin/constance/change_list.html index e055d1b..6f5b937 100644 --- a/constance/templates/admin/constance/change_list.html +++ b/constance/templates/admin/constance/change_list.html @@ -23,6 +23,13 @@
{% csrf_token %} + {% if form.non_field_errors %} +
    + {% for error in form.non_field_errors %} +
  • {{ error }}
  • + {% endfor %} +
+ {% endif %} {% if form.errors %}
    {% endif %} diff --git a/docs/index.rst b/docs/index.rst index 15057ac..8d04c60 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -209,7 +209,7 @@ pass the object to the template context: def myview(request): return render(request, 'my_template.html', {'config': config}) -Or you can use the included config context processor.: +Or you can use the included config context processor. For Django pre-1.8, this looks like this: .. code-block:: python @@ -218,6 +218,12 @@ Or you can use the included config context processor.: 'constance.context_processors.config', ) +For Django 1.8 and above, insert ``'constance.context_processors.config'`` at +the top of your ``TEMPLATES['OPTIONS']['context_processors']`` list. See the +`Django documentation`_ for details. + +.. _`Django documentation`: https://docs.djangoproject.com/en/1.11/ref/templates/upgrading/#the-templates-settings + This will add the config instance to the context of any template rendered with a ``RequestContext``. @@ -260,7 +266,7 @@ If the value contains spaces it should be wrapped in quotes. .. note:: Set values are validated as per in admin, an error will be raised if validation fails: -Eg, given this config as per the example app:: +E.g., given this config as per the example app:: CONSTANCE_CONFIG = { ... @@ -276,7 +282,7 @@ Then setting an invalid date will fail as follow:: .. note:: If the admin fields is a `MultiValueField`, (e.g. datetime, which uses `SplitDateTimeField` by default) then the separate field values need to be provided as separate arguments. -Eg, given this config:: +E.g., given this config:: CONSTANCE_CONFIG = { 'DATETIME_VALUE': (datetime(2010, 8, 23, 11, 29, 24), 'time of the first commit'), diff --git a/tox.ini b/tox.ini index f83db48..a387797 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,8 @@ envlist = py{27,34,35,py}-django-19 py{27,34,35,py}-django-110 py{27,34,35,36,py}-django-111 - py{34,35,36}-django-master + py{34,35,36}-django-20 + py{35,36}-django-master [testenv] deps = @@ -16,9 +17,11 @@ deps = django-19: Django>=1.9,<1.10 django-110: Django>=1.10,<1.11 django-111: Django>=1.11,<2.0 + django-20: Django>=2.0a1,<2.1 django-master: https://github.com/django/django/archive/master.tar.gz usedevelop = True ignore_outcome = + django-20: True django-master: True commands = coverage run {envbindir}/django-admin test -v2