moinsetup

Changeset

44:0aa7a495381b
2011-09-16 Paul Boddie raw files shortlog changelog graph Added support for placing the static resources in a nominated directory even when using normal (non-limited) hosting.
examples/moinsetup.cfg.debian (file) moinsetup.py (file)
     1.1 --- a/examples/moinsetup.cfg.debian	Thu Sep 15 23:57:53 2011 +0200
     1.2 +++ b/examples/moinsetup.cfg.debian	Fri Sep 16 00:35:03 2011 +0200
     1.3 @@ -2,6 +2,7 @@
     1.4  prefix            = /usr
     1.5  site_packages     = /var/lib/python-support/python2.5
     1.6  web_app_dir       = /var/www/mywiki
     1.7 +web_static_dir    = /var/www/mywiki
     1.8  web_site_dir      = /etc/apache2/sites-available
     1.9  
    1.10  [site]
     2.1 --- a/moinsetup.py	Thu Sep 15 23:57:53 2011 +0200
     2.2 +++ b/moinsetup.py	Fri Sep 16 00:35:03 2011 +0200
     2.3 @@ -450,9 +450,10 @@
     2.4              self.htdocs_dir = join(self.web_static_dir or self.web_app_dir, self.static_url_path.lstrip("/"))
     2.5  
     2.6          # Otherwise, a mapping is made to the directory.
     2.7 +        # This may be placed in a special static directory if desired.
     2.8  
     2.9          else:
    2.10 -            self.htdocs_dir = join(self.common_dir, "htdocs")
    2.11 +            self.htdocs_dir = join(self.web_static_dir or self.common_dir, "htdocs")
    2.12  
    2.13      def _get_abspath(self, d):
    2.14          return d and abspath(d) or None