Adding an Export Format for files in Django Admin


I have added the ImportExportActionModelAdmin function in my Admin for Project, but I can not find the option to choose the format of the file to download and option to export orders.

I have followed the following documnetation about Import and Export but still the action function didn't appear

How do I add that option to download features?

enter image description here

Here is the

def order_pdf(obj):
    return mark_safe('<a href="{}">PDF</a>'.format(reverse('core:admin_order_pdf', args=[])))

order_pdf.short_description = 'Order PDF'

class OrderAdmin(ImportExportActionModelAdmin):
    list_display = ['id', ....., order_pdf]

Read more here:

Content Attribution

This content was originally published by A_K at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: