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

feat: require debug mode for browsable api #36

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

niccofyren
Copy link
Member

A bit more work than anticipated, but got it working. Seems like rest_framework and browsable API are kind of integral to Wagtail default setup. This fix disables it for the current routes/viewsets and future ones need to be handled independently (or we make our default "base" viewsets that we import instead of wagtail ones)

Side note, this manipulation doesn't handle env changes super gracefully, so restart server if changing debug mode.

Closes: #29

@niccofyren niccofyren requested a review from a team as a code owner October 24, 2024 16:47
@niccofyren niccofyren requested a review from pr0xity October 24, 2024 16:47
@niccofyren niccofyren enabled auto-merge (squash) October 24, 2024 17:27
Copy link
Member

@mfyll mfyll left a comment

Choose a reason for hiding this comment

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

I think this is the only supported method as of right now, and I think we will be able to manage updating this manually.

Looks good to me! 🚀

@niccofyren niccofyren merged commit c649dd1 into main Oct 24, 2024
5 checks passed
@niccofyren niccofyren deleted the feat/require-debug-for-html-api branch October 24, 2024 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Change default API viewer to JSON
2 participants