changeset 3602:3b265efc5eb2

fix sample configs to use new page_*_regex defaults
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 15 May 2008 00:46:06 +0200
parents 148669312bf8
children 43aa566b0ec7 d0b5d160d255
files wiki/config/wikiconfig.py wiki/config/wikifarm/farmconfig.py
diffstat 2 files changed, 16 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/wiki/config/wikiconfig.py	Wed May 14 21:39:27 2008 +0200
+++ b/wiki/config/wikiconfig.py	Thu May 15 00:46:06 2008 +0200
@@ -148,12 +148,15 @@
     # The main wiki language, set the direction of the wiki pages
     language_default = 'en'
 
+    # the following regexes should match the complete name when used in free text
+    # the group 'all' shall match all, while the group 'key' shall match the key only
+    # e.g. CategoryFoo -> group 'all' ==  CategoryFoo, group 'key' == Foo
+    # moin's code will add ^ / $ at beginning / end when needed
     # You must use Unicode strings here [Unicode]
-    page_category_regex = u'^Category[A-Z]'
-    page_dict_regex = u'[a-z]Dict$'
-    page_form_regex = u'[a-z]Form$'
-    page_group_regex = u'[a-z]Group$'
-    page_template_regex = u'[a-z]Template$'
+    page_category_regex = ur'(?P<all>Category(?P<key>\S+))'
+    page_dict_regex = ur'(?P<all>(?P<key>\S+)Dict)'
+    page_group_regex = ur'(?P<all>(?P<key>\S+)Group)'
+    page_template_regex = ur'(?P<all>(?P<key>\S+)Template)'
 
     # Content options ---------------------------------------------------
 
--- a/wiki/config/wikifarm/farmconfig.py	Wed May 14 21:39:27 2008 +0200
+++ b/wiki/config/wikifarm/farmconfig.py	Thu May 15 00:46:06 2008 +0200
@@ -160,11 +160,15 @@
     # The main wiki language, set the direction of the wiki pages
     language_default = 'en'
 
+    # the following regexes should match the complete name when used in free text
+    # the group 'all' shall match all, while the group 'key' shall match the key only
+    # e.g. CategoryFoo -> group 'all' ==  CategoryFoo, group 'key' == Foo
+    # moin's code will add ^ / $ at beginning / end when needed
     # You must use Unicode strings here [Unicode]
-    page_category_regex = u'^Category[A-Z]'
-    page_dict_regex = u'[a-z]Dict$'
-    page_group_regex = u'[a-z]Group$'
-    page_template_regex = u'[a-z]Template$'
+    page_category_regex = ur'(?P<all>Category(?P<key>\S+))'
+    page_dict_regex = ur'(?P<all>(?P<key>\S+)Dict)'
+    page_group_regex = ur'(?P<all>(?P<key>\S+)Group)'
+    page_template_regex = ur'(?P<all>(?P<key>\S+)Template)'
 
     # Content options ---------------------------------------------------