I don't know if this question had been covered or not yet, I searched all the related questions but I couldn't find a solution.
What I want to do is to create a table using django-tables2 with a model let's say model A, and I want to add a custom column to this table having value from model B which is not related in any case to model A.
This is what I did
class TableA(tables.Table):
class Meta:
model = A
template_name = "django_tables2/bootstrap.html"
fields = ("id","username","data_from_b")
Where can I put the B.objects.filter() to append it's data to a custom column.
Your help would be appreciated. Thanks.
def render_b_objs(): return B.objects.filter()- Ben