changeset 4863:69073f6b028a

Groups2009: Dicts and groups values are defined in the config.multiconfig. _tests.wikiconfig_groups was removed.
author Dmitrijs Milajevs <dimazest@gmail.com>
date Sat, 18 Jul 2009 18:58:03 +0200
parents c098b029cf60
children 25a5452d3510
files MoinMoin/_tests/wikiconfig.py MoinMoin/_tests/wikiconfig_groups.py MoinMoin/config/multiconfig.py
diffstat 3 files changed, 9 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/wikiconfig.py	Sat Jul 18 18:14:45 2009 +0200
+++ b/MoinMoin/_tests/wikiconfig.py	Sat Jul 18 18:58:03 2009 +0200
@@ -16,7 +16,7 @@
 from MoinMoin.config.multiconfig import DefaultConfig
 
 
-class LocalConfig(DefaultConfig):
+class Config(DefaultConfig):
     sitename = u'Developer Test Wiki'
     logo_string = sitename
 
@@ -31,10 +31,3 @@
     # used to check if it is really a wiki we may modify
     is_test_wiki = True
 
-try:
-    from wikiconfig_groups import Config
-except ImportError, err:
-    if not str(err).endswith('wikiconfig_groups'):
-        raise
-    Config = LocalConfig
-
--- a/MoinMoin/_tests/wikiconfig_groups.py	Sat Jul 18 18:14:45 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-# -*- coding: iso-8859-1 -*-
-"""
-MoinMoin.groups related configuration is defined here.
-
-@copyright: 2009 by MoinMoin:DmitrijsMilajevs
-@license: GNU GPL, see COPYING for details.
-"""
-
-from wikiconfig import LocalConfig
-from MoinMoin.datastruct import WikiGroups, WikiDicts
-
-class Config(LocalConfig):
-    groups = lambda self, request: WikiGroups(request)
-    dicts = lambda self, request: WikiDicts(request)
-
--- a/MoinMoin/config/multiconfig.py	Sat Jul 18 18:14:45 2009 +0200
+++ b/MoinMoin/config/multiconfig.py	Sat Jul 18 18:58:03 2009 +0200
@@ -17,6 +17,7 @@
 logging = log.getLogger(__name__)
 
 from MoinMoin import config, error, util, wikiutil, web
+from MoinMoin import datastruct
 from MoinMoin.auth import MoinAuth
 import MoinMoin.auth as authmodule
 import MoinMoin.events as events
@@ -698,6 +699,13 @@
 #
 options_no_group_name = {
   # ==========================================================================
+  'datastruct': ('Datastruct settings', None, (
+    ('dicts', lambda self, request: datastruct.WikiDicts(request),
+     "function f(self, request) that returns a backend which is used to access dicts definitions. See HelpOnDictionaries."),
+    ('groups', lambda self, request: datastruct.WikiGroups(request),
+     "function f(self, request) that returns a backend which is used to access groups definitions."),
+  )),
+  # ==========================================================================
   'session': ('Session settings', "Session-related settings, see HelpOnSessions.", (
     ('session_service', DefaultExpression('web.session.FileSessionService()'),
      "The session service."),