Safrone

Results 17 comments of Safrone

Would be a nice feature to have and applies to both device and gateway page. Ostensibly requires adding a `sort_by` field to the device/gateway api and subsequently tying that to...

> Can you give some pointers how one would go about implementing support for `anyOf`, `oneOf`, etc.? Redoc might be a good place to look since they have implemented at...

The way I managed this is by using filter_backends in the views. ``` from .filter import MyFilter class MyViewSet(GenericViewSet): filter_backends = (MyFilter,) ... in filter.py class MyFilter(BaseFilterBackend): def get_schema_fields(self, view):...

Try adding this function to the MyFilter class. def filter_queryset(self, request, queryset, view): return queryset Otherwise maybe it could have to do with the renderer_classes? This is how it looks...

I have the same issue, It would be nice if it used the same general bounding box as regular inlines: ![image](https://user-images.githubusercontent.com/14047377/141191807-57fb7c15-299a-4e8e-bd72-4c2354ec1934.png) here is a regular inline followed by a polymorphic...

just adding grp-module makes the display a fair bit nicer ![image](https://user-images.githubusercontent.com/14047377/141193210-becd92d9-387b-424e-8569-6a193dbb4bbf.png) this can be done by adding `classes = ['grp-module']` to the StackedPolymorphicInline subclass: ![image](https://user-images.githubusercontent.com/14047377/141193767-76c50d83-f062-43ac-8ca0-f2a2c7c5416a.png)

I was able to fix most of the styling issues by overriding the templates in case someone wants a quick fix: `templates/admin/tabular_paginated.html` : copy `templates/admin/edit_inline/tabular.html` from grappelli and add `{%...

FYI this is how https://github.com/theatlantic/django-nested-admin handles this: nested_admin.nested.NestedStackedInlineMixin: ``` class NestedStackedInlineMixin(NestedInlineModelAdminMixin): if 'grappelli' in settings.INSTALLED_APPS: template = 'nesting/admin/inlines/grappelli_stacked.html' else: template = 'nesting/admin/inlines/stacked.html' class NestedStackedInline(NestedStackedInlineMixin, InlineModelAdmin): pass ```

I would love to have this as an option when extracting tables even if it is not the default behavior.

A hacky workaround for now: ``` from rest_framework import permissions from drf_yasg.generators import OpenAPISchemaGenerator from drf_yasg.views import get_schema_view from drf_yasg import openapi import os class SchemaGenerator(OpenAPISchemaGenerator): def get_schema(self, request=None, public=False):...