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 only JSON rendering for views #56

Merged
merged 2 commits into from
Feb 20, 2025

Conversation

AlmerCarbonEquity
Copy link
Contributor

@AlmerCarbonEquity AlmerCarbonEquity commented Feb 20, 2025

Fixes #55

Set the renderer on the views so only JSON is allowed to be rendered. Without this, there is a TemplateDoesNotExist error if the endpoints are visited with a browser.

Copy link

codecov bot commented Feb 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.0%. Comparing base (e32901c) to head (c23f688).
Report is 13 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #56   +/-   ##
=======================================
  Coverage   100.0%   100.0%           
=======================================
  Files          13       13           
  Lines         683      688    +5     
  Branches       56       56           
=======================================
+ Hits          683      688    +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@Stormheg Stormheg left a comment

Choose a reason for hiding this comment

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

Thanks!

@Stormheg Stormheg merged commit 66a8c1c into Stormbase:main Feb 20, 2025
11 checks passed
Stormheg added a commit that referenced this pull request Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

rest_framework/api.html TemplateDoesNotExist
2 participants