CTFd TemplateNotFound

While uploading a custom theme, I fat-fingered and renamed the theme after I had selected it. After a reboot, I can’t figure out how to change back to the default theme and when I run docker-compose up, I get this error:
ctfd_1 | File "/usr/local/lib/python2.7/site-packages/flask/templating.py", line 86, in _get_source_fast ctfd_1 | raise TemplateNotFound(template) ctfd_1 | TemplateNotFound: errors/500.html

Where can I edit the build scripts to point it back to the default template?

Couldn’t you rename the theme back to it’s original name? I think that’s the simplest way to fix this.

This sounds like an area for improvement though. Perhaps some kind of exception handling on bad theme lookups or a command that resets the theme. I created https://github.com/CTFd/CTFd/issues/1226 to track this.

Some new commands were added to the manage.py script to let you reset themes. https://github.com/CTFd/CTFd/pull/1233

With the latest code you should be able to do:

python manage.py set_config ctf_theme core

This should reset you back to the default theme.