-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Feature 307 integrate drf browsable api #317
Feature 307 integrate drf browsable api #317
Conversation
@2ynn there are some forms like in For example I get this error when requesting HTML format when the browsable api is on: |
Also what do you think if we use a harvest list serializer that returns less data than the original serializer? using the big database made the whole site pretty unusable for me. Maybe this combined with pagination would make a lot of pages a lot faster. |
@mina-andajos for filtering we should use built-in rest filtering (to be tested in Browsable API) Filter forms should already be generated for you without needing to pass them to context manually. See see Crispy forms might be what you are looking for: https://django-filter.readthedocs.io/en/main/guide/rest_framework.html#crispy-forms |
thanks, i looked into the rest filtering doc but was still confused on how to implement that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I'll approve now so you can move on but if you don't mind please move the function closer to where it's being used. Thanks!
cea6fc8
to
4b1553c
Compare
4b1553c
to
767a475
Compare
Fixes #307
Type of change:
What's Changed:
get_drf_template_mode()
to return which drf template mode to use inDEFAULT_RENDERER_CLASSES
reading the envScreenshots:
DRF_BROWSABLE_API_MODE=yes
DRF_BROWSABLE_API_MODE=no
Affected URLs:
e.g.
127.0.0.1:8000/*
Checklist: