-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
Environment
- Python version: 3.6.8
- NetBox version: 2.10.4
Proposed Functionality
Add an option to the Export Template functionality where it does not download the export template as an attachment, but instead presents it right away.
Use Case
Allow rendered content to be opened straight away. Currently I am generating a link using the Export Template and am required to open the downloaded attachment and click on the link to access the page. Being able to adjust this behaviour would make for a smoother workflow.
Database Changes
Boolean field on the ExportTemplate model for deciding whether to set the Content-Disposition to attachment. Suggests to set this default as True to keep the current workflow as standard.
External Dependencies
None
On my test instance I commented out the line
netbox/netbox/extras/models/models.py
Line 279 in 3d3748d
| response['Content-Disposition'] = 'attachment; filename="{}"'.format(filename) |