Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unwanted foo/ from wikiconfig.py examples; fixes #1649 #1650

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

RogerHaase
Copy link
Member

No description provided.

'help-common': 'help-common', # contains media files used by other language helps
'help-en': 'help-en', # replace this with help-de, help-ru, help-pt_BR etc.
# define custom namespaces if desired, trailing / below causes foo to be stored in default backend
# 'foo/': 'default',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea behind that was that pages starting with foo/ (== subpages of foo) are stored in that namespace.

If you remove the slash, page foobar and fool will also be stored into that namespace.

Except if there was a code change that auto-appends a slash. Is that the case?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The trailing / was from /storage/__init__.py create_simple_mapping #563 when wikiconfig.py used create_simple_mapping. The trailing / is no longer in the docs https://moin-20.readthedocs.io/en/latest/admin/configure.html#create-simple-mapping but lived on in code comments.

wikiconfig.py now uses create_mapping per #1237 which allows admins to create custom namespaces.

namespaces = {
    # maps namespace name -> backend name
    # first, configure the required, standard namespaces:
    NAMESPACE_DEFAULT: 'default',
    - snip -
    # some additional custom namespaces stored in default backend:
    'foo': 'default',
    'bar': 'default',
    # custom namespace with a backend
    'baz': 'baz',
}

There were 2 code changes, trailing / was removed from create_simple_mapping, and wikiconfig.py changed to use create_mapping.

@RogerHaase RogerHaase merged commit 1d0fd0a into moinwiki:master Mar 19, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants