diff MoinMoin/config/multiconfig.py @ 1318:760002b5ffa3

use url_prefix_static = '/moin_static160' instead of url_prefix = '/wiki' to avoid user confusion and stale caches
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 18 Aug 2006 23:23:27 +0200
parents 7c29a18a7e26
children 544b931cd965
line wrap: on
line diff
--- a/MoinMoin/config/multiconfig.py	Fri Aug 18 21:20:15 2006 +0200
+++ b/MoinMoin/config/multiconfig.py	Fri Aug 18 23:23:27 2006 +0200
@@ -404,7 +404,25 @@
 
     # Wiki identity
     sitename = u'Untitled Wiki'
-    url_prefix = '/wiki'
+
+    # url_prefix is DEPRECATED and not used any more by the code.
+    # it confused many people by its name and default value of '/wiki' to the
+    # wrong conclusion that it is the url of the wiki (the dynamic) stuff,
+    # but it was used to address the static stuff (images, css, js).
+    # Thus we use the more clear url_prefix_static ['/staticXXX'] setting now.
+    # For a limited time, we still look at url_prefix - if it is not None, we
+    # copy the value to url_prefix_static to ease transition.
+    url_prefix = None
+
+    # include the moin version number, so we can have a unlimited cache lifetime
+    # for the static stuff. if stuff changes on version upgrade, url will change
+    # immediately and we have no problem with stale caches.
+    url_prefix_static = '/moin_static160'
+
+    # we need to prefix actions to be able to exclude them by robots.txt:
+    # TODO:
+    # url_prefix_action = '/action'
+
     logo_string = None
     interwikiname = None
 
@@ -562,6 +580,9 @@
         self._acl_rights_default = AccessControlList(self, [self.acl_rights_default])
         self._acl_rights_after = AccessControlList(self, [self.acl_rights_after])
 
+        if self.url_prefix is not None: # remove this code when url_prefix setting is removed
+            self.url_prefix_static = self.url_prefix
+
     def load_meta_dict(self):
         """ The meta_dict contains meta data about the wiki instance. """
         if getattr(self, "_meta_dict", None) is None: