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

Support for multiple wikis #63

Closed
mjacksonw opened this issue Sep 21, 2012 · 7 comments
Closed

Support for multiple wikis #63

mjacksonw opened this issue Sep 21, 2012 · 7 comments
Labels
enhancement A feature request: Will be implemented if someone steps up!

Comments

@mjacksonw
Copy link

Title says pretty much all of it. It would be amazing to be able to have multiple wikis on one site, with each Article owned by/associated with a higher level Wiki object.

@benjaoming
Copy link
Member

The wiki is hierarchical, so you have to explain exactly what properties this wiki should have that's not possible through the article/urlpath system :)

It's not a won't do, it's just something that was (hopefully) thought through before :)

@mjacksonw
Copy link
Author

It's (perhaps highly) likely that I'm just not seeing how to do these things given the early state of documentation and such, which is totally understandable, but I'd like to:

  • Have separate hierarchies that have no visible relationship to each other.
  • Have articles with the same "name" in separate namespaces -- one "wiki" cannot link to another.
  • Have independent permission structures for each -- wiki A's groups are distinct from wiki B's, and the "other" for each one is separate as well: "other" users of wiki A cannot read/write to wiki B.
  • An overarching "admin" group that does indeed get to work across wikis would be ideal as well, but this could just be handled by adding these users to the respective admin groups of each wiki.

If those things can be done under the existing structure, that's even better. Just not clear on how to make that happen at the moment.

@benjaoming
Copy link
Member

Generally: Since the wiki relies on django.contrib.auth for users and groups, you cannot have two groups with the same name, but different members. This will only cause you the possibility of clashes, even though there is a notion of separate wiki entities.

I can see the point about the links, but maybe that's more about not being able to link to something that an editor does not have read access to. Actually, this is already a feature of wiki.plugins.links -- it only suggests articles that the user has read permissions to!

Have separate hierarchies that have no visible relationship to each other.

This is a definition case. Even if a Wiki model is established, and the Article model is given a ForeignKey to the WIki model, there is no definite way to answer the question: Can a wiki refer to another wiki?

An overarching "admin" group that does indeed get to work across wikis would be ideal as well, but this could just be handled by adding these users to the respective admin groups of each wiki.

You can implement your own functions for handling permissions. The default permission is to look for the moderate, grant and assign permission groups, which are global.

If a bit late, I hope it's inspiring enough to look for solutions on the existing foundation.

@benjaoming
Copy link
Member

Another tip:

If you are using the wiki with other apps, you can still create the illusion of having the wiki for different hierarchies by adding it as the very last handler in your urlconf. In that way, if you have some app handling stuff in the "/path/some-app/" url hierarchy, you could still fill in dummy articles with slugs "path", "some-app" and "wiki", and you would get a wiki located at "/path/some-site/wiki/".

However, the link plugin would then create link tags formatted as [Title](/path/some-site/wiki/Title) - but that's still about fixing the links plugin to support relative paths or simply article ids.

@freddylimpens
Copy link

Regarding this topic, we develop a django-based social platform with multiple apps allowing members to showcase their project, and participate in working groups and we want to have one wiki per group (which would be located at http://myplateform.org/group/group-name/wiki/). In order to avoid having to create dummy pages, is it possible, with the existing structure, to set one root-page per group (like http://myplateform.org/group/group-name/wiki/my-group-root-page) and then be able to extend the hierarchy from this point? If more advanced customization is needed, where would you advice to start with?

@benjaoming
Copy link
Member

I think you should stick to the one-tree thought a bit... at the moment, separating the project into several wiki trees is not an immediate feature to be implemented.

However, you can achieve the same by having a redirect setup for instance:

group-name/wiki/ -> wiki/group-name/

And then ensure that you have set the correct permissions on the group-name subtree.

If you pursued the "separate tree" model, you wouldn't be able to cross-reference content and links between the wikis. So I think since you're talking about a social platform with working groups, consider the benefit of having those groups able to reference each others work.

@rjmoggach
Copy link

rjmoggach commented Jun 30, 2017

I know it's been a while since this subject has been approached - I actually do want distinct wikis with a foreignKey relationship for each wiki to a given parent object which might be a client-facing wiki or an internal project wiki or a public information wiki

I understand that these could exist in the same tree with the above workaround but it doesn't fully address the request for my use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A feature request: Will be implemented if someone steps up!
Projects
None yet
Development

No branches or pull requests

4 participants