-
Notifications
You must be signed in to change notification settings - Fork 14
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
fix: set JSONRenderer as the DEFAULT_RENDERER_CLASSES #35
fix: set JSONRenderer as the DEFAULT_RENDERER_CLASSES #35
Conversation
IDK if using
|
@CodeWithEmad thanks for the PR. From my experience, Regarding the action that is failing, I'm not sure what's going on, I suspect the Token used in this workflow was removed. @regisb could you confirm? There are failures in a similar workflow in the Tutor repo |
Thanks for the response, @jfavellar90
I appreciate any suggestions here. I wish there were an
At first, I went there to change the config, but they store essential configs inside |
in production environments, it's not the best practice to have a browsable API and normally only a json should be returned. Close overhangio#34
93adf14
to
c52eb18
Compare
What is the issue that we are trying to fix here? Is it that the API browser is badly displayed, or is that that the API browser should not be displayed at all? What behaviour would we like to have, both in production and development? Do we want to have a JSON-rendered API in production? If yes, then checking for HTTPS is not the right way to detect production settings. If we should have different settings in production and development, then we should either have different setting files, or define ENV variables in both environments. But if we do want to have a browseable API in production, then we should configure uwsgi/gunicorn to serve static assets. |
Well, I think having a Browsable API in production is not necessarily a bad thing, but this is a common pattern, where only JSON Renderer is used on the production environment due to some security and performance issues. |
I'm happy with either. What do you think @jfavellar90? |
As we discussed in Tutor users' group, it's a better approach to add this change to |
This will introduce a similar approach as edx-platform to set JSONRenderer as the DEFAULT_RENDERER_CLASSES. with this, we don't have Browsable API Anymore. also, some RST cleanup in README. See here for more context: overhangio/tutor-notes#35
in production environments, it's not the best practice to have a browsable API and normally only a json should be returned.
Close #34