[Moin-devel] PATCH - underlaid directory for system pages

Thomas Waldmann tw-public at gmx.de
Wed Feb 25 09:59:00 EST 2004


Hi Fujio,

> Thank you for providing this great software.  I really love
> it.

We all do ;)

> This patch lets you use a immutable directory for pages,
> such as system pages, which can be shared by different
> instances of MoinMoin on a server.

This is a really nice idea.

I think I'll review this stuff and discuss that later on the #moin IRC 
channel.

> You can modify FrontPage, of cource,  and modified page is
> saved in the data/text directory in that instance.  You can
> add, modify, delete, or rename the files of the instance.

Great.

>  cp /some_where_you_installed/moin/share/moin/data/text/* \
>      /var/htdocs/common

Well, I think it needn't be under htdocs.

> !             if config.underlay_dir:
> !                 from distutils.file_util import copy_file
 > !                 copy_file(page_filename,

Uuh. Is there no other way than to import from distutils? OK, we use it 
for installing anyway, but I think this is the first time it is used in 
core code.

> +             msg = _('You can not delete this page because it is treated as a base.'))

"As a base?" - maybe just tell that this page is from the underlay 
directory.

> +         msg = _('You can not rename this page because it is treated as a base.')

Same.

>       pages = os.listdir(text_dir)
> +     if config.underlay_dir:
> +         # add files only in underlay_dir
> +         underlay_pages = os.listdir(config.underlay_dir)
> +         for file in underlay_pages:
> +             if not (file in pages):
> +                 pages.append(file)

This could make some trouble in other parts of the code. As we return 
only the names of the pages and other code might expect that all pages 
are in the data/text directory.

Another question is what happens on searching and other functions 
accessing all pages.

greetings,

Thomas




More information about the Moin-devel mailing list