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

Allow overriding of challenge and group behaviours for better customisation #3

Merged
merged 6 commits into from
Mar 1, 2024

Conversation

trickeydan
Copy link
Owner

This PR moves much of the inner functionality of challenges to functions that can be overridden when creating a class, similar to Django class based views.

This enables us to dynamically generate flags, content and solutions depending on request context.

This might be particularly helpful for CTFs that wish to store data for the user session.

This introduces the following notable changes:

  • Breaking Change: challenges are now instantiated when registered to a group
  • Breaking Change: group is now passed as a constructor argument to a challenge
  • Deprecation of introduction_md and introduction_html in favour of parts

Copy link
Collaborator

@Skyler84 Skyler84 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks really cool!

@trickeydan trickeydan merged commit 4cd92a6 into main Mar 1, 2024
10 checks passed
@trickeydan trickeydan deleted the better-runtime branch March 1, 2024 19:15
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

2 participants