Open odoublewen opened 2 years ago
I tried this:
class FooViewServerSide(ServerSideDatatableView):
queryset = models.Foo.objects.annotate(number_of_bars =Count('bar')).all()
columns = ['field1', 'field2', 'number_of_bars']
but, as you probably won't be surprised to learn, it doesn't work.
django.core.exceptions.FieldError: Cannot resolve keyword 'number_of_bars' into field
@umesh-krishna Can you think of any clever way to make properties available in the server-side data table view?
I.e. say my models look like:
How can I get
number_of_bars
into the datatable?