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

Page copy #379

Merged
merged 8 commits into from Jul 3, 2014
Merged

Page copy #379

merged 8 commits into from Jul 3, 2014

Conversation

kaedroho
Copy link
Contributor

This pull request adds a "copy" method to pages.

By default, this will make an exact copy of the page and place new page immediately after the old page in the tree.

Basic usage: page.copy()

Options:

recursive - Setting this to True will copy the entire subtree of the page as well (default is False)

to - This lets you specify a different parent page to copy the page into. The page would be added as the last child of this page

update_attrs - This is a dictionary of attributes and values to change before saving the copy. Eg: page.copy(update_attrs={title: "New Title", slug: 'new-slug'})

This is ready for review/merge. I'll create the admin UI in a separate PR

@chrxr chrxr added this to the 0.4 milestone Jun 30, 2014
@gasman gasman merged commit bf03c05 into wagtail:master Jul 3, 2014
@kaedroho kaedroho deleted the page-duplication branch September 11, 2015 08:23
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.

None yet

3 participants