Import Backup File Ignores Theme

I have a CTF setup that we’ve tweaked and adjusted to ‘just the way we want’ with the intent of standing up a new instance periodically to ‘match’ this setup. We use the custom-beta theme along with the multiple_choice plugin.

We’ve automated the build of the instance, that is the git cloning of the CTFd repo, copying over the theme & plugin files and unzipping them to the correct locations, copying the the backup/export file to the host into the correct location, starting CTF, and them running the manage.py import_ctf to load the backup.

One of the problems we have, however, is the theme is set to core-beta when we make the backup, however after the backup is restored into the new instance, the theme shows only core. It becomes necessary to manually go in and edit the theme to core-beta. I’d rather this setting be restored.

Why isn’t it? Is there something I can do? Or is this a bug?

Force setting the theme to core on import is by design.

You can manually force the theme using manage.py and set_config.

python manage.py set_config ctf_theme core-beta

1 Like