Added property to IZEOConnection to define a ZODB connection from a configuration file ZTK-1.1
authorThierry Florac <tflorac@ulthar.net>
Sat, 15 Jan 2022 00:23:22 +0100
branchZTK-1.1
changeset 277 35f11f1758e9
parent 276 6b7e4b7b6efe
child 278 03a06fa9807c
Added property to IZEOConnection to define a ZODB connection from a configuration file
src/ztfy/utils/interfaces.py
src/ztfy/utils/locales/en/LC_MESSAGES/ztfy.utils.mo
src/ztfy/utils/locales/en/LC_MESSAGES/ztfy.utils.po
src/ztfy/utils/locales/fr/LC_MESSAGES/ztfy.utils.mo
src/ztfy/utils/locales/fr/LC_MESSAGES/ztfy.utils.po
src/ztfy/utils/locales/ztfy.utils.pot
src/ztfy/utils/zodb.py
--- a/src/ztfy/utils/interfaces.py	Thu Jun 04 15:50:36 2020 +0200
+++ b/src/ztfy/utils/interfaces.py	Sat Jan 15 00:23:22 2022 +0100
@@ -23,7 +23,7 @@
 # import local interfaces
 
 # import Zope3 packages
-from zope.interface import Interface, Attribute
+from zope.interface import invariant, Interface, Invalid, Attribute
 from zope.schema import TextLine, Int, Password, Bool
 
 # import local packages
@@ -300,21 +300,30 @@
 class IZEOConnection(Interface):
     """ZEO connection settings interface"""
 
+    config_path = TextLine(title=_("ZODB configuration path"),
+                           description=_("Absolute path to ZODB configuration file"),
+                           required=False)
+
     server_name = TextLine(title=_("ZEO server name"),
                            description=_("Hostname of ZEO server"),
-                           required=True,
+                           required=False,
                            default=u'localhost')
 
     server_port = Int(title=_("ZEO server port"),
                       description=_("Port number of ZEO server"),
-                      required=True,
+                      required=False,
                       default=8100)
 
     storage = TextLine(title=_("ZEO server storage"),
                        description=_("Storage name on ZEO server"),
-                       required=True,
+                       required=False,
                        default=u'1')
 
+    @invariant
+    def check_configuration(self):
+        if not (self.config_path or self.server_name):
+            raise Invalid(_("You must define configuration path or hostname"))
+
     username = TextLine(title=_("ZEO user name"),
                         description=_("User name on ZEO server"),
                         required=False)
Binary file src/ztfy/utils/locales/en/LC_MESSAGES/ztfy.utils.mo has changed
--- a/src/ztfy/utils/locales/en/LC_MESSAGES/ztfy.utils.po	Thu Jun 04 15:50:36 2020 +0200
+++ b/src/ztfy/utils/locales/en/LC_MESSAGES/ztfy.utils.po	Sat Jan 15 00:23:22 2022 +0100
@@ -14,7 +14,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: ZTFY.utils\n"
-"POT-Creation-Date: Tue Apr 23 11:16:22 2013\n"
+"POT-Creation-Date: Sat Jan 15 00:17:16 2022\n"
 "PO-Revision-Date: 2009-08-14 18:14+0200\n"
 "Last-Translator: Thierry Florac <tflorac@ulthar.net>\n"
 "Language-Team: French <traduc@traduc.org>\n"
@@ -24,3 +24,600 @@
 "Content-Transfer-Encoding: 8bit\n"
 "Generated-By: zope/app/locales/extract.py\n"
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: ztfy/utils/browser/encoding.py:47
+msgid "-- automatic selection --"
+msgstr ""
+
+#: ztfy/utils/browser/zodb.py:40
+msgid "ZEO connection properties"
+msgstr ""
+
+#: ztfy/utils/date.py:112
+msgid "%d months ago"
+msgstr ""
+
+#: ztfy/utils/date.py:114
+msgid "%d weeks ago"
+msgstr ""
+
+#: ztfy/utils/date.py:116
+msgid "%d days ago"
+msgstr ""
+
+#: ztfy/utils/date.py:118
+msgid "the day before yesterday"
+msgstr ""
+
+#: ztfy/utils/date.py:120
+msgid "yesterday"
+msgstr ""
+
+#: ztfy/utils/date.py:124
+msgid "%d hours ago"
+msgstr ""
+
+#: ztfy/utils/date.py:126
+msgid "%d minutes ago"
+msgstr ""
+
+#: ztfy/utils/date.py:128
+msgid "less than 5 minutes ago"
+msgstr ""
+
+#: ztfy/utils/date.py:139
+msgid "%d months"
+msgstr ""
+
+#: ztfy/utils/date.py:141
+msgid "%d weeks"
+msgstr ""
+
+#: ztfy/utils/date.py:143
+msgid "%d days"
+msgstr ""
+
+#: ztfy/utils/date.py:147
+msgid "%d day and %d hours"
+msgstr ""
+
+#: ztfy/utils/date.py:150
+msgid "%d hours"
+msgstr ""
+
+#: ztfy/utils/date.py:154
+msgid "%d minutes"
+msgstr ""
+
+#: ztfy/utils/date.py:156
+msgid "%d seconds"
+msgstr ""
+
+#: ztfy/utils/date.py:79
+msgid "%d/%m/%Y"
+msgstr ""
+
+#: ztfy/utils/date.py:80
+msgid "%d/%m/%Y - %H:%M"
+msgstr ""
+
+#: ztfy/utils/date.py:82
+msgid "on %d/%m/%Y"
+msgstr ""
+
+#: ztfy/utils/date.py:83
+msgid "on %d/%m/%Y at %H:%M"
+msgstr ""
+
+#: ztfy/utils/encoding.py:100
+msgid "Greek (iso8859_7)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:101
+msgid "Hebrew (iso8859_8)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:102
+msgid "Turkish (iso8859_9)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:103
+msgid "Nordic languages (iso8859_10)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:104
+msgid "Baltic languages (iso8859_13)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:105
+msgid "Celtic languages (iso8859_14)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:106
+msgid "Western Europe (iso8859_15)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:107
+msgid "South-Eastern Europe (iso8859_16)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:108
+msgid "Korean (johab)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:109
+msgid "Russian (koi8_r)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:110
+msgid "Ukrainian (koi8_u)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:111
+msgid "Bulgarian, Byelorussian, Macedonian, Russian, Serbian (mac_cyrillic)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:112
+msgid "Greek (mac_greek)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:113
+msgid "Icelandic (mac_iceland)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:114
+msgid "Central and Eastern Europe (mac_latin2)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:115
+msgid "Western Europe (mac_roman)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:116
+msgid "Turkish (mac_turkish)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:117
+msgid "Kazakh (ptcp154)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:118
+msgid "Japanese (shift_jis)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:119
+msgid "Japanese (shift_jis_2004)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:120
+msgid "Japanese (shift_jisx0213)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:121
+msgid "all languages (utf_32)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:122
+msgid "all languages (utf_32_be)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:123
+msgid "all languages (utf_32_le)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:124
+msgid "all languages (utf_16)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:125
+msgid "all languages (BMP only - utf_16_be)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:126
+msgid "all languages (BMP only - utf_16_le)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:127
+msgid "all languages (utf_7)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:128
+msgid "all languages (utf_8)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:129
+msgid "all languages (utf_8_sig)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:38
+msgid "English (ASCII)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:39
+msgid "Traditional Chinese (big5)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:40
+msgid "Traditional Chinese (big5hkscs)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:41
+msgid "English (cp037)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:42
+msgid "Hebrew (cp424)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:43
+msgid "English (cp437)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:44
+msgid "Western Europe (cp500)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:45
+msgid "Arabic (cp720)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:46
+msgid "Greek (cp737)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:47
+msgid "Baltic languages (cp775)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:48
+msgid "Western Europe (cp850)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:49
+msgid "Central and Eastern Europe (cp852)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:50
+msgid "Bulgarian, Byelorussian, Macedonian, Russian, Serbian (cp855)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:51
+msgid "Hebrew (cp856)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:52
+msgid "Turkish (cp857)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:53
+msgid "Western Europe (cp858)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:54
+msgid "Portuguese (cp860)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:55
+msgid "Icelandic (cp861)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:56
+msgid "Hebrew (cp862)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:57
+msgid "Canadian (cp863)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:58
+msgid "Arabic (cp864)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:59
+msgid "Danish, Norwegian (cp865)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:60
+msgid "Russian (cp866)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:61
+msgid "Greek (cp869)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:62
+msgid "Thai (cp874)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:63
+msgid "Greek (cp875)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:64
+msgid "Japanese (cp932)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:65
+msgid "Korean (cp949)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:66
+msgid "Traditional Chinese (cp950)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:67
+msgid "Urdu (cp1006)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:68
+msgid "Turkish (cp1026)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:69
+msgid "Western Europe (cp1140)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:70
+msgid "Central and Eastern Europe (cp1250)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:71
+msgid "Bulgarian, Byelorussian, Macedonian, Russian, Serbian (cp1251)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:72
+msgid "Western Europe (cp1252)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:73
+msgid "Greek (cp1253)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:74
+msgid "Turkish (cp1254)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:75
+msgid "Hebrew (cp1255)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:76
+msgid "Arabic (cp1256)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:77
+msgid "Baltic languages (cp1257)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:78
+msgid "Vietnamese (cp1258)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:79
+msgid "Japanese (euc_jp)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:80
+msgid "Japanese (euc_jis_2004)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:81
+msgid "Japanese (euc_jisx0213)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:82
+msgid "Korean (euc_kr)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:83
+msgid "Simplified Chinese (gb2312)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:84
+msgid "Unified Chinese (gbk)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:85
+msgid "Unified Chinese (gb18030)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:86
+msgid "Simplified Chinese (hz)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:87
+msgid "Japanese (iso2022_jp)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:88
+msgid "Japanese (iso2022_jp_1)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:89
+msgid ""
+"Japanese, Korean, Simplified Chinese, Western Europe, Greek (iso2022_jp_2)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:90
+msgid "Japanese (iso2022_jp_2004)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:91
+msgid "Japanese (iso2022_jp_3)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:92
+msgid "Japanese (iso2022_jp_ext)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:93
+msgid "Korean (iso2022_kr)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:94
+msgid "West Europe (latin_1)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:95
+msgid "Central and Eastern Europe (iso8859_2)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:96
+msgid "Esperanto, Maltese (iso8859_3)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:97
+msgid "Baltic languages (iso8859_4)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:98
+msgid "Bulgarian, Byelorussian, Macedonian, Russian, Serbian (iso8859_5)"
+msgstr ""
+
+#: ztfy/utils/encoding.py:99
+msgid "Arabic (iso8859_6)"
+msgstr ""
+
+#: ztfy/utils/interfaces.py:303
+msgid "ZODB configuration path"
+msgstr ""
+
+#: ztfy/utils/interfaces.py:304
+msgid "Absolute path to ZODB configuration file"
+msgstr ""
+
+#: ztfy/utils/interfaces.py:307
+msgid "ZEO server name"
+msgstr ""
+
+#: ztfy/utils/interfaces.py:308
+msgid "Hostname of ZEO server"
+msgstr ""
+
+#: ztfy/utils/interfaces.py:312
+msgid "ZEO server port"
+msgstr ""
+
+#: ztfy/utils/interfaces.py:313
+msgid "Port number of ZEO server"
+msgstr ""
+
+#: ztfy/utils/interfaces.py:317
+msgid "ZEO server storage"
+msgstr ""
+
+#: ztfy/utils/interfaces.py:318
+msgid "Storage name on ZEO server"
+msgstr ""
+
+#: ztfy/utils/interfaces.py:325
+msgid "You must define configuration path or hostname"
+msgstr ""
+
+#: ztfy/utils/interfaces.py:327
+msgid "ZEO user name"
+msgstr ""
+
+#: ztfy/utils/interfaces.py:328
+msgid "User name on ZEO server"
+msgstr ""
+
+#: ztfy/utils/interfaces.py:331
+msgid "ZEO password"
+msgstr ""
+
+#: ztfy/utils/interfaces.py:332
+msgid "User password on ZEO server"
+msgstr ""
+
+#: ztfy/utils/interfaces.py:335
+msgid "ZEO server realm"
+msgstr ""
+
+#: ztfy/utils/interfaces.py:336
+msgid "Realm name on ZEO server"
+msgstr ""
+
+#: ztfy/utils/interfaces.py:339
+msgid "BLOBs directory"
+msgstr ""
+
+#: ztfy/utils/interfaces.py:340
+msgid "Directory path for blob data"
+msgstr ""
+
+#: ztfy/utils/interfaces.py:343
+msgid "Shared BLOBs directory ?"
+msgstr ""
+
+#: ztfy/utils/interfaces.py:344
+msgid ""
+"Flag whether the blob_dir is a server-shared filesystem that should be used "
+"instead of transferring blob data over zrpc."
+msgstr ""
+
+#: ztfy/utils/interfaces.py:349
+msgid "Opened ZEO connection"
+msgstr ""
+
+#: ztfy/utils/request.py:82
+msgid "No Request in interaction !"
+msgstr ""
+
+#: ztfy/utils/schema.py:66
+msgid "Color length must be 3 or 6 characters"
+msgstr ""
+
+#: ztfy/utils/schema.py:69
+msgid ""
+"Color value must contain only valid color codes (numbers or letters between "
+"'A' end 'F')"
+msgstr ""
+
+#: ztfy/utils/schema.py:92
+msgid "The entered value is not a valid decimal literal."
+msgstr ""
+
+#: ztfy/utils/security.py:71
+msgid "< missing principal %s >"
+msgstr ""
+
+#: ztfy/utils/security.py:75
+msgid "This principal can't be found in any authentication utility..."
+msgstr ""
+
+#: ztfy/utils/size.py:41
+msgid "%d bytes"
+msgstr ""
+
+#: ztfy/utils/size.py:45
+msgid "%.1f Kb"
+msgstr ""
+
+#: ztfy/utils/size.py:47
+msgid "%s Kb"
+msgstr ""
+
+#: ztfy/utils/size.py:51
+msgid "%.2f Mb"
+msgstr ""
+
+#: ztfy/utils/size.py:53
+msgid "%s Mb"
+msgstr ""
+
+#: ztfy/utils/size.py:56
+msgid "%.3f Gb"
+msgstr ""
+
+#: ztfy/utils/size.py:58
+msgid "%s Gb"
+msgstr ""
+
+#: ztfy/utils/timezone/interfaces.py:35
+msgid "Server timezone"
+msgstr ""
+
+#: ztfy/utils/timezone/interfaces.py:36
+msgid "Default server timezone"
+msgstr ""
Binary file src/ztfy/utils/locales/fr/LC_MESSAGES/ztfy.utils.mo has changed
--- a/src/ztfy/utils/locales/fr/LC_MESSAGES/ztfy.utils.po	Thu Jun 04 15:50:36 2020 +0200
+++ b/src/ztfy/utils/locales/fr/LC_MESSAGES/ztfy.utils.po	Sat Jan 15 00:23:22 2022 +0100
@@ -16,7 +16,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: ZTFY.utils\n"
-"POT-Creation-Date: Tue Apr 23 11:16:22 2013\n"
+"POT-Creation-Date: Sat Jan 15 00:17:16 2022\n"
 "PO-Revision-Date: 2012-03-26 14:18+0200\n"
 "Last-Translator: Thierry Florac <thierry.florac@onf.fr>\n"
 "Language-Team: français <>\n"
@@ -35,71 +35,79 @@
 msgid "ZEO connection properties"
 msgstr "Propriétés de la connexion ZEO"
 
-#: ztfy/utils/date.py:102
+#: ztfy/utils/date.py:112
 msgid "%d months ago"
 msgstr "il y a %d mois"
 
-#: ztfy/utils/date.py:104
+#: ztfy/utils/date.py:114
 msgid "%d weeks ago"
 msgstr "il y a %d semaines"
 
-#: ztfy/utils/date.py:106
+#: ztfy/utils/date.py:116
 msgid "%d days ago"
 msgstr "il y a %d jours"
 
-#: ztfy/utils/date.py:108
+#: ztfy/utils/date.py:118
 msgid "the day before yesterday"
 msgstr "avant-hier"
 
-#: ztfy/utils/date.py:110
+#: ztfy/utils/date.py:120
 msgid "yesterday"
 msgstr "hier"
 
-#: ztfy/utils/date.py:114
+#: ztfy/utils/date.py:124
 msgid "%d hours ago"
 msgstr "il y a %d heures"
 
-#: ztfy/utils/date.py:116
+#: ztfy/utils/date.py:126
 msgid "%d minutes ago"
 msgstr "il y a %d minutes"
 
-#: ztfy/utils/date.py:118
+#: ztfy/utils/date.py:128
 msgid "less than 5 minutes ago"
 msgstr "il y a moins de 5 minutes"
 
-#: ztfy/utils/date.py:129
+#: ztfy/utils/date.py:139
 msgid "%d months"
 msgstr "%d mois"
 
-#: ztfy/utils/date.py:131
+#: ztfy/utils/date.py:141
 msgid "%d weeks"
 msgstr "%d semaines"
 
-#: ztfy/utils/date.py:133
+#: ztfy/utils/date.py:143
 msgid "%d days"
 msgstr "%d jours"
 
-#: ztfy/utils/date.py:137
+#: ztfy/utils/date.py:147
 msgid "%d day and %d hours"
 msgstr "%d jours et %d heures"
 
-#: ztfy/utils/date.py:140
+#: ztfy/utils/date.py:150
 msgid "%d hours"
 msgstr "%d heures"
 
-#: ztfy/utils/date.py:144
+#: ztfy/utils/date.py:154
 msgid "%d minutes"
 msgstr "%d minutes"
 
-#: ztfy/utils/date.py:146
+#: ztfy/utils/date.py:156
 msgid "%d seconds"
 msgstr "%d secondes"
 
 #: ztfy/utils/date.py:79
+msgid "%d/%m/%Y"
+msgstr "%d/%m/%Y"
+
+#: ztfy/utils/date.py:80
+msgid "%d/%m/%Y - %H:%M"
+msgstr "%d/%m/%Y - %H:%M"
+
+#: ztfy/utils/date.py:82
 msgid "on %d/%m/%Y"
 msgstr "le %d/%m/%Y"
 
-#: ztfy/utils/date.py:80
+#: ztfy/utils/date.py:83
 msgid "on %d/%m/%Y at %H:%M"
 msgstr "le %d/%m/%Y à %H:%M"
 
@@ -430,7 +438,8 @@
 #: ztfy/utils/encoding.py:89
 msgid ""
 "Japanese, Korean, Simplified Chinese, Western Europe, Greek (iso2022_jp_2)"
-msgstr "Japonais, Coréen, Chinois simplifié, Europe de l'ouest, Grec (iso2022-jp-2)"
+msgstr ""
+"Japonais, Coréen, Chinois simplifié, Europe de l'ouest, Grec (iso2022-jp-2)"
 
 #: ztfy/utils/encoding.py:90
 msgid "Japanese (iso2022_jp_2004)"
@@ -472,75 +481,88 @@
 msgid "Arabic (iso8859_6)"
 msgstr "Arabe (iso8859-6)"
 
-#: ztfy/utils/interfaces.py:155
+#: ztfy/utils/interfaces.py:303
+msgid "ZODB configuration path"
+msgstr "Fichier de configuration"
+
+#: ztfy/utils/interfaces.py:304
+msgid "Absolute path to ZODB configuration file"
+msgstr "Chemin d'accès absolu à un fichier de configuration"
+
+#: ztfy/utils/interfaces.py:307
 msgid "ZEO server name"
 msgstr "Nom du serveur"
 
-#: ztfy/utils/interfaces.py:156
+#: ztfy/utils/interfaces.py:308
 msgid "Hostname of ZEO server"
 msgstr "Nom ou adresse IP du serveur ZEO"
 
-#: ztfy/utils/interfaces.py:160
+#: ztfy/utils/interfaces.py:312
 msgid "ZEO server port"
 msgstr "Numéro de port"
 
-#: ztfy/utils/interfaces.py:161
+#: ztfy/utils/interfaces.py:313
 msgid "Port number of ZEO server"
 msgstr "N° du port TCP d'écoute du serveur ZEO"
 
-#: ztfy/utils/interfaces.py:165
+#: ztfy/utils/interfaces.py:317
 msgid "ZEO server storage"
 msgstr "Nom du stockage"
 
-#: ztfy/utils/interfaces.py:166
+#: ztfy/utils/interfaces.py:318
 msgid "Storage name on ZEO server"
 msgstr "Nom du stockage ZEO"
 
-#: ztfy/utils/interfaces.py:170
+#: ztfy/utils/interfaces.py:325
+msgid "You must define configuration path or hostname"
+msgstr "Vous devez définir le chemin d'un fichier de configuration ou le nom du serveur"
+
+#: ztfy/utils/interfaces.py:327
 msgid "ZEO user name"
 msgstr "Code utilisateur"
 
-#: ztfy/utils/interfaces.py:171
+#: ztfy/utils/interfaces.py:328
 msgid "User name on ZEO server"
 msgstr "Code utilisateur de connexion au serveur ZEO"
 
-#: ztfy/utils/interfaces.py:174
+#: ztfy/utils/interfaces.py:331
 msgid "ZEO password"
 msgstr "Mot de passe"
 
-#: ztfy/utils/interfaces.py:175
+#: ztfy/utils/interfaces.py:332
 msgid "User password on ZEO server"
 msgstr "Mot de passe de connexion au serveur ZEO"
 
-#: ztfy/utils/interfaces.py:178
+#: ztfy/utils/interfaces.py:335
 msgid "ZEO server realm"
 msgstr "Royaume"
 
-#: ztfy/utils/interfaces.py:179
+#: ztfy/utils/interfaces.py:336
 msgid "Realm name on ZEO server"
 msgstr "Nom du royaume du serveur ZEO, si nécessaire"
 
-#: ztfy/utils/interfaces.py:182
+#: ztfy/utils/interfaces.py:339
 msgid "BLOBs directory"
 msgstr "Dossier de stockage des blobs"
 
-#: ztfy/utils/interfaces.py:183
+#: ztfy/utils/interfaces.py:340
 msgid "Directory path for blob data"
 msgstr "Dossier local au serveur servant de cache aux données des BLOBs"
 
-#: ztfy/utils/interfaces.py:186
+#: ztfy/utils/interfaces.py:343
 msgid "Shared BLOBs directory ?"
 msgstr "Répertoire partagé ?"
 
-#: ztfy/utils/interfaces.py:187
+#: ztfy/utils/interfaces.py:344
 msgid ""
 "Flag whether the blob_dir is a server-shared filesystem that should be used "
 "instead of transferring blob data over zrpc."
-msgstr "Indique si le répertoire indiqué doit être utilisé en tant que répertoire "
+msgstr ""
+"Indique si le répertoire indiqué doit être utilisé en tant que répertoire "
 "partagé avec le serveur ZEOau lieu d'effectuer un transfert de données via "
 "zRPC"
 
-#: ztfy/utils/interfaces.py:192
+#: ztfy/utils/interfaces.py:349
 msgid "Opened ZEO connection"
 msgstr "Lien vers la connexion ZEO"
 
@@ -556,7 +578,8 @@
 msgid ""
 "Color value must contain only valid color codes (numbers or letters between "
 "'A' end 'F')"
-msgstr "Une couleur ne doit contenir que des caractères hexadécimaux (nombres et "
+msgstr ""
+"Une couleur ne doit contenir que des caractères hexadécimaux (nombres et "
 "lettres de 'A' à 'F')"
 
 #: ztfy/utils/schema.py:92
@@ -606,4 +629,3 @@
 #: ztfy/utils/timezone/interfaces.py:36
 msgid "Default server timezone"
 msgstr "Fuseau horaire par défaut du serveur"
-
--- a/src/ztfy/utils/locales/ztfy.utils.pot	Thu Jun 04 15:50:36 2020 +0200
+++ b/src/ztfy/utils/locales/ztfy.utils.pot	Sat Jan 15 00:23:22 2022 +0100
@@ -14,7 +14,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: Meaningless\n"
-"POT-Creation-Date: Tue Apr 23 11:16:22 2013\n"
+"POT-Creation-Date: Sat Jan 15 00:17:16 2022\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: Zope 3 Developers <zope-dev@zope.org>\n"
@@ -31,71 +31,79 @@
 msgid "ZEO connection properties"
 msgstr ""
 
-#: ztfy/utils/date.py:102
+#: ztfy/utils/date.py:112
 msgid "%d months ago"
 msgstr ""
 
-#: ztfy/utils/date.py:104
+#: ztfy/utils/date.py:114
 msgid "%d weeks ago"
 msgstr ""
 
-#: ztfy/utils/date.py:106
+#: ztfy/utils/date.py:116
 msgid "%d days ago"
 msgstr ""
 
-#: ztfy/utils/date.py:108
-msgid "the day before yesterday"
-msgstr ""
-
-#: ztfy/utils/date.py:110
-msgid "yesterday"
-msgstr ""
-
-#: ztfy/utils/date.py:114
-msgid "%d hours ago"
-msgstr ""
-
-#: ztfy/utils/date.py:116
-msgid "%d minutes ago"
-msgstr ""
-
 #: ztfy/utils/date.py:118
+msgid "the day before yesterday"
+msgstr ""
+
+#: ztfy/utils/date.py:120
+msgid "yesterday"
+msgstr ""
+
+#: ztfy/utils/date.py:124
+msgid "%d hours ago"
+msgstr ""
+
+#: ztfy/utils/date.py:126
+msgid "%d minutes ago"
+msgstr ""
+
+#: ztfy/utils/date.py:128
 msgid "less than 5 minutes ago"
 msgstr ""
 
-#: ztfy/utils/date.py:129
+#: ztfy/utils/date.py:139
 msgid "%d months"
 msgstr ""
 
-#: ztfy/utils/date.py:131
+#: ztfy/utils/date.py:141
 msgid "%d weeks"
 msgstr ""
 
-#: ztfy/utils/date.py:133
+#: ztfy/utils/date.py:143
 msgid "%d days"
 msgstr ""
 
-#: ztfy/utils/date.py:137
+#: ztfy/utils/date.py:147
 msgid "%d day and %d hours"
 msgstr ""
 
-#: ztfy/utils/date.py:140
+#: ztfy/utils/date.py:150
 msgid "%d hours"
 msgstr ""
 
-#: ztfy/utils/date.py:144
+#: ztfy/utils/date.py:154
 msgid "%d minutes"
 msgstr ""
 
-#: ztfy/utils/date.py:146
+#: ztfy/utils/date.py:156
 msgid "%d seconds"
 msgstr ""
 
 #: ztfy/utils/date.py:79
+msgid "%d/%m/%Y"
+msgstr ""
+
+#: ztfy/utils/date.py:80
+msgid "%d/%m/%Y - %H:%M"
+msgstr ""
+
+#: ztfy/utils/date.py:82
 msgid "on %d/%m/%Y"
 msgstr ""
 
-#: ztfy/utils/date.py:80
+#: ztfy/utils/date.py:83
 msgid "on %d/%m/%Y at %H:%M"
 msgstr ""
 
@@ -467,71 +475,83 @@
 msgid "Arabic (iso8859_6)"
 msgstr ""
 
-#: ztfy/utils/interfaces.py:155
+#: ztfy/utils/interfaces.py:303
+msgid "ZODB configuration path"
+msgstr ""
+
+#: ztfy/utils/interfaces.py:304
+msgid "Absolute path to ZODB configuration file"
+msgstr ""
+
+#: ztfy/utils/interfaces.py:307
 msgid "ZEO server name"
 msgstr ""
 
-#: ztfy/utils/interfaces.py:156
+#: ztfy/utils/interfaces.py:308
 msgid "Hostname of ZEO server"
 msgstr ""
 
-#: ztfy/utils/interfaces.py:160
+#: ztfy/utils/interfaces.py:312
 msgid "ZEO server port"
 msgstr ""
 
-#: ztfy/utils/interfaces.py:161
+#: ztfy/utils/interfaces.py:313
 msgid "Port number of ZEO server"
 msgstr ""
 
-#: ztfy/utils/interfaces.py:165
+#: ztfy/utils/interfaces.py:317
 msgid "ZEO server storage"
 msgstr ""
 
-#: ztfy/utils/interfaces.py:166
+#: ztfy/utils/interfaces.py:318
 msgid "Storage name on ZEO server"
 msgstr ""
 
-#: ztfy/utils/interfaces.py:170
+#: ztfy/utils/interfaces.py:325
+msgid "You must define configuration path or hostname"
+msgstr ""
+
+#: ztfy/utils/interfaces.py:327
 msgid "ZEO user name"
 msgstr ""
 
-#: ztfy/utils/interfaces.py:171
+#: ztfy/utils/interfaces.py:328
 msgid "User name on ZEO server"
 msgstr ""
 
-#: ztfy/utils/interfaces.py:174
+#: ztfy/utils/interfaces.py:331
 msgid "ZEO password"
 msgstr ""
 
-#: ztfy/utils/interfaces.py:175
+#: ztfy/utils/interfaces.py:332
 msgid "User password on ZEO server"
 msgstr ""
 
-#: ztfy/utils/interfaces.py:178
+#: ztfy/utils/interfaces.py:335
 msgid "ZEO server realm"
 msgstr ""
 
-#: ztfy/utils/interfaces.py:179
+#: ztfy/utils/interfaces.py:336
 msgid "Realm name on ZEO server"
 msgstr ""
 
-#: ztfy/utils/interfaces.py:182
+#: ztfy/utils/interfaces.py:339
 msgid "BLOBs directory"
 msgstr ""
 
-#: ztfy/utils/interfaces.py:183
+#: ztfy/utils/interfaces.py:340
 msgid "Directory path for blob data"
 msgstr ""
 
-#: ztfy/utils/interfaces.py:186
+#: ztfy/utils/interfaces.py:343
 msgid "Shared BLOBs directory ?"
 msgstr ""
 
-#: ztfy/utils/interfaces.py:187
+#: ztfy/utils/interfaces.py:344
 msgid "Flag whether the blob_dir is a server-shared filesystem that should be used instead of transferring blob data over zrpc."
 msgstr ""
 
-#: ztfy/utils/interfaces.py:192
+#: ztfy/utils/interfaces.py:349
 msgid "Opened ZEO connection"
 msgstr ""
 
--- a/src/ztfy/utils/zodb.py	Thu Jun 04 15:50:36 2020 +0200
+++ b/src/ztfy/utils/zodb.py	Sat Jan 15 00:23:22 2022 +0100
@@ -30,6 +30,7 @@
 # import Zope3 packages
 from ZEO import ClientStorage
 from ZODB import DB
+from ZODB.config import databaseFromURL
 from zope.component import adapter
 from zope.componentvocabulary.vocabulary import UtilityVocabulary
 from zope.container.contained import Contained
@@ -55,6 +56,7 @@
     _db = None
     _connection = None
 
+    config_path = FieldProperty(IZEOConnection['config_path'])
     server_name = FieldProperty(IZEOConnection['server_name'])
     server_port = FieldProperty(IZEOConnection['server_port'])
     storage = FieldProperty(IZEOConnection['storage'])
@@ -78,15 +80,19 @@
 
     def getConnection(self, wait=False, get_storage=False):
         """Get a tuple made of storage and DB connection for given settings"""
-        storage = ClientStorage.ClientStorage((str(self.server_name), self.server_port),
-                                              storage=self.storage,
-                                              username=self.username or '',
-                                              password=self.password or '',
-                                              realm=self.server_realm,
-                                              blob_dir=self.blob_dir,
-                                              shared_blob_dir=self.shared_blob_dir,
-                                              wait=wait)
-        db = DB(storage)
+        if self.config_path:
+            db = databaseFromURL(self.config_path)
+            storage = db.storage
+        else:
+            storage = ClientStorage.ClientStorage((str(self.server_name), self.server_port),
+                                                  storage=self.storage,
+                                                  username=self.username or '',
+                                                  password=self.password or '',
+                                                  realm=self.server_realm,
+                                                  blob_dir=self.blob_dir,
+                                                  shared_blob_dir=self.shared_blob_dir,
+                                                  wait=wait)
+            db = DB(storage)
         return (storage, db) if get_storage else db
 
     @property