Skip to content

How to export with ManyToManyField #44

@ieiayaobb

Description

@ieiayaobb

For the ManyToManyField, how to export it with a specified field?
For example:
Model: order, item, and order_to_item(many to many)
I'm going to use make_response_from_query_sets to generate the excel:
excel.make_response_from_query_sets( orders, column_names=['id', 'items__content'], file_type='xls', file_name="Order List"

But I get noting for the 'items__content' column.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions