nsot icon indicating copy to clipboard operation
nsot copied to clipboard

Allowing sites to be nested in other sites

Open rmhasan opened this issue 8 years ago • 2 comments

This is a PR for #215. This PR allows Sites to be nested in other sites. I performed the following tests. I also created a pull request for pynsot that allows users to pass the id of the parent site. The command line argument for passing the parent id is -p

EDIT: I made the pull request dropbox/pynsot#124

$ nsot sites add -n first
# site with name 'first' is added

$ nsot sites add -n second -p 1
# site with name 'second' is added and its parent is 1

$ nsot sites remove -i 1
# site was not removed, because it is second sites parent

$ nsot sites update -i 1 -p 1
# fails because a site cannot be nested in itself

$ nsot sites add -n third -p 2
$ nsot sites add -n fourth -p 3
$ nsot sites add -n fifth -p 4
$ nsot sites update -i 1 -p 5
# update fails because site with id 5 is a child or grand child of site with id 1

rmhasan avatar Jan 13 '17 03:01 rmhasan

@rmhasan Thanks for this contribution, too! Me and the other maintainers will be taking a look and try to keep this conversation going.

jathanism avatar Jan 17 '17 18:01 jathanism

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Apr 16 '22 21:04 CLAassistant