Download a finished export


Drag the divider or use the arrow keys to compare themes.
Django Chassis 1.0.23 · training site with Russian UI
- The operation details show the successful status and result count.
- The completed result is available to users with the download grant.
How to add it
Grant catalog_demo.download_device_export on the same staff group that can view devices and export history. Chassis serves the file through the mounted DeviceAdmin and private media storage. After finishing one export as demo-admin, run this in ./run.sh shell to obtain the download path for the latest completed file.
from django.urls import reverse
from django_chassis.enums import ExportStatus
from django_chassis.models import ExportHistory
operation = ExportHistory.objects.filter(
section='admin', content_type__app_label='catalog_demo', content_type__model='device',
created_by__username='demo-admin', status=ExportStatus.SUCCESS
).exclude(file='').latest('created_at')
print(reverse('admin:catalog_demo_device_export_download', kwargs={'history_id': operation.pk}))
Open the printed path while signed in to download the file. The same action appears in the button bar under the successful operation's fieldset.