Created
May 29, 2024 21:00
-
-
Save ericdrosas87/e1db4a07b6298d8ae8671e7dc534032f to your computer and use it in GitHub Desktop.
Pantopes API - Copy project template to new project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First have the project owner ensure their project is not set to "live", and then configure the project to be a template: | |
from panoptes_client import Project | |
project_template = Project.find(slug="crhiggs/template-test") | |
project_template.configuration = {"template": True} | |
project_template.save() | |
# Then, have the user who wants to create a new project based on the project template do: | |
from panoptes_client import Project | |
project_template = Project.find(slug="crhiggs/template-test") | |
my_template_project = project_template.copy() | |
my_template_project.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment