changeset 1689:7b80735ede14

quicklinks_default and subscribed_pages_default to preload the lists in the user profile
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 26 Nov 2006 22:23:25 +0100
parents 07da298b129a
children 6fe30ca971e7
files MoinMoin/config/multiconfig.py MoinMoin/user.py docs/CHANGES
diffstat 3 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/config/multiconfig.py	Sun Nov 26 16:19:22 2006 +0100
+++ b/MoinMoin/config/multiconfig.py	Sun Nov 26 22:23:25 2006 +0100
@@ -368,6 +368,7 @@
         'view':        ({}, _("View"), "view"),
         }
 
+    quicklinks_default = [] # preload user quicklinks with this page list
     refresh = None # (minimum_delay, type), e.g.: (2, 'internal')
     rss_cache = 60 # suggested caching time for RecentChanges RSS, in seconds
     shared_intermap = None # can be string or list of strings (filenames)
@@ -380,6 +381,7 @@
     show_version = False
     siteid = 'default'
     stylesheets = [] # list of tuples (media, csshref) to insert after theme css, before user css
+    subscribed_pages_default = [] # preload user subscribed pages with this page list
     superuser = [] # list of unicode user names that have super powers :)
 
     surge_action_limits = {# allow max. <count> <action> requests per <dt> secs
--- a/MoinMoin/user.py	Sun Nov 26 16:19:22 2006 +0100
+++ b/MoinMoin/user.py	Sun Nov 26 22:23:25 2006 +0100
@@ -246,8 +246,8 @@
         self.language = ""
         self.date_fmt = ""
         self.datetime_fmt = ""
-        self.quicklinks = []
-        self.subscribed_pages = []
+        self.quicklinks = self._cfg.quicklinks_default
+        self.subscribed_pages = self._cfg.subscribed_pages_default
         self.theme_name = self._cfg.theme_default
         self.editor_default = self._cfg.editor_default
         self.editor_ui = self._cfg.editor_ui
--- a/docs/CHANGES	Sun Nov 26 16:19:22 2006 +0100
+++ b/docs/CHANGES	Sun Nov 26 22:23:25 2006 +0100
@@ -269,6 +269,8 @@
         will see a "Load draft" button. Click on it to load the draft into the
         editor and save the page.
       * The draft storage is per user and per page, but only one draft per page.
+    * cfg.quicklinks_default and cfg.subscribed_pages_default can be used to
+      preload new user profiles with configurable values.
 
   Bugfixes:
     * on action "info" page, "revert" link will not be displayed for empty page