Skip to content

Instantly share code, notes, and snippets.

@ericdrosas87
Created May 29, 2024 21:00
Show Gist options
  • Save ericdrosas87/e1db4a07b6298d8ae8671e7dc534032f to your computer and use it in GitHub Desktop.
Save ericdrosas87/e1db4a07b6298d8ae8671e7dc534032f to your computer and use it in GitHub Desktop.
Pantopes API - Copy project template to new project
# 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